/* =========================================
   KEEP CANVAS — LIBRARY
========================================= */

body {
    font-family: 'Inter', sans-serif;
}

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
}

.kc-library {
    max-width: 1100px;
    margin: 0 auto;

    padding: 42px 32px 110px;

    box-sizing: border-box;
}


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

.kc-library-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 28px;
}

.kc-library-header h1 {
    margin: 0;

    font-size: 36px;
    line-height: 1.15;

    color: #132238;

    font-weight: 700;
    letter-spacing: -0.8px;
}

.kc-library-header p {
    margin: 8px 0 0;

    color: #7a8794;

    font-size: 16px;
}


.kc-library-view-btn {
    width: 46px;
    height: 46px;

    border: 1px solid #e1e6e9;
    border-radius: 14px;

    background: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #15916f;

    cursor: pointer;
}

.kc-library-view-btn svg {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.7;
}


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

.kc-library-search {
    height: 54px;

    background: #ffffff;

    border: 1px solid #e1e6e9;

    border-radius: 10px;

    display: flex;
    align-items: center;

    padding: 0 17px;

    box-sizing: border-box;

    margin-bottom: 18px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.kc-library-search:focus-within {
    border-color: #15916f;

    box-shadow:
        0 0 0 3px rgba(21, 145, 111, 0.08);
}

.kc-library-search svg {
    width: 22px;
    height: 22px;

    flex-shrink: 0;

    fill: none;
    stroke: #696969;

    stroke-width: 1.8;
}

.kc-library-search input {
    width: 100%;

    border: none;
    outline: none;

    background: transparent;

    margin-left: 12px;

    font-family: inherit;

    font-size: 15px;

    color: #172536;
}

.kc-library-search input::placeholder {
    color: #9aa4ad;
}


/* =========================================
   FILTERS
========================================= */

.kc-library-filters {
    display: flex;

    gap: 8px;

    margin-bottom: 38px;

    overflow-x: auto;

    scrollbar-width: none;
}

.kc-library-filters::-webkit-scrollbar {
    display: none;
}


.kc-library-filter {
    flex-shrink: 0;

    border: 1px solid #e1e6e9;

    background: #ffffff;

    color: #667381;

    border-radius: 999px;

    padding: 9px 18px;

    font-family: inherit;

    font-size: 13px;

    font-weight: 500;

    cursor: pointer;
    
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kc-library-filter.kc-filter-active {
    background: #15916f;

    border-color: #15916f;

    color: #ffffff;
}


/* =========================================
   SECTION
========================================= */

.kc-library-section {
    margin-bottom: 40px;
}


.kc-library-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 17px;
}

.kc-library-section-heading h2 {
    margin: 0;

    color: #132238;

    font-size: 21px;

    font-weight: 700;
}

.kc-library-section-heading a {
    color: #15916f;
    text-decoration: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.kc-library-section-heading a:active {
    transform: scale(0.97);
}

.kc-library-section-heading button {
    border: none;
    background: transparent;

    color: #15916f;

    font-family: inherit;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;
}


/* =========================================
   FOLDER GRID
========================================= */

.kc-library-folder-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;
}


.kc-folder-card {
    min-height: 125px;

    background: #ffffff;

    border: 1px solid #e1e6e9;

    border-radius: 18px;

    padding: 18px;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.kc-folder-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 24px rgba(20, 35, 50, 0.06);
}


.kc-folder-icon {
    width: 58px;
    height: 58px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 32px;
}


.kc-folder-blue {
    background: #edf4ff;
}

.kc-folder-pink {
    background: #fff0f2;
}

.kc-folder-yellow {
    background: #fff6df;
}

.kc-folder-green {
    background: #e8f7f2;
}


.kc-folder-info h3 {
    margin: 10px 0 3px;

    color: #172536;

    font-size: 18px;

    font-weight: 600;
}

.kc-folder-info p {
    margin: 0;

    color: #8a959f;

    font-size: 12px;
}


/* =========================================
   FILE LIST
========================================= */

.kc-library-file-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


.kc-library-file {
    min-height: 76px;

    background: #ffffff;

    border: 1px solid #e1e6e9;

    border-radius: 17px;

    padding: 12px 14px;

    box-sizing: border-box;

    display: flex;
    align-items: center;

    gap: 13px;
}


.kc-file-icon {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    border-radius: 13px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
}


.kc-file-pdf {
    background: #eaf8f4;
}

.kc-file-note {
    background: #f3ebff;
}

.kc-file-image {
    background: #fff0f2;
}


.kc-file-info {
    min-width: 0;

    flex: 1;
}

.kc-file-info h3 {
    margin: 0 0 4px;

    color: #172536;

    font-size: 15px;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.kc-file-info p {
    margin: 0;

    color: #8a959f;

    font-size: 12px;
}

.kc-file-info p span {
    margin: 0 4px;
}


.kc-file-more {
    width: 34px;
    height: 40px;

    flex-shrink: 0;

    border: none;

    background: transparent;

    color: #7c8893;

    font-size: 23px;

    line-height: 1;

    cursor: pointer;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 800px) {

    .kc-library {
        padding-left: 24px;
        padding-right: 24px;
    }

    .kc-library-folder-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .kc-library {
        padding: 30px 32px 105px;
    }


    .kc-library-header {
        margin-bottom: 22px;
    }


    .kc-library-header h1 {
        font-size: 30px;
    }

    .kc-library-header p {
        font-size: 14px;
    }


    .kc-library-view-btn {
        width: 42px;
        height: 42px;

        border-radius: 13px;
    }


    .kc-library-search {
        height: 52px;

        border-radius: 10px;
    }


    .kc-library-filters {
        margin-bottom: 32px;
    }


    .kc-library-section {
        margin-bottom: 34px;
    }


    .kc-library-section-heading h2 {
        font-size: 19px;
    }


    .kc-library-folder-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }


    .kc-folder-card {
        min-height: 102px;

        padding: 15px;

        border-radius: 17px;
    }


    .kc-folder-icon {
        width: 54px;
        height: 54px;

        border-radius: 12px;
    }


    .kc-folder-info h3 {
        font-size: 16px;
    }


    .kc-library-file {
        min-height: 72px;

        padding: 11px;

        border-radius: 12px;
    }


    .kc-file-icon {
        width: 45px;
        height: 45px;
    }

}

/* =========================================
   KEEP CANVAS — LIBRARY LIST VIEW
========================================= */

/* Folder list becomes one column */

.kc-library-list-view .kc-library-folder-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}


/* =========================================
   HORIZONTAL FOLDER CARD
========================================= */

.kc-library-list-view .kc-folder-card {
    width: 100%;
    min-height: 96px;

    box-sizing: border-box;

    display: flex;
    flex-direction: row;
    align-items: center;

    gap: 24px;

    padding: 16px 18px;

    text-align: left;

    border: none;
    border-bottom: 1px solid #edf0f2;
    border-radius: 0;

    background: transparent;
}


/* =========================================
   FOLDER ICON BOX
========================================= */

.kc-library-list-view .kc-folder-icon {
    flex: 0 0 58px;

    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;

    border-radius: 16px;

    font-size: 35px;
    line-height: 1;

    box-sizing: border-box;
}


/* =========================================
   FOLDER INFORMATION
========================================= */

.kc-library-list-view .kc-folder-info {
    flex: 1;
    min-width: 0;

    margin: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    text-align: left;
}


/* =========================================
   FOLDER NAME
========================================= */

.kc-library-list-view .kc-folder-info h3 {
    margin: 0 0 4px;

    text-align: left;

    font-size: 18px;
    font-weight: 600;

    line-height: 1.25;
}


/* =========================================
   ITEM COUNT
========================================= */

.kc-library-list-view .kc-folder-info p {
    margin: 0;

    text-align: left;

    font-size: 12px;
    line-height: 1.3;

    color: #8b959e;
}


/* =========================================
   MOBILE LIST VIEW
========================================= */

@media (max-width: 600px) {

    .kc-library-list-view .kc-library-folder-grid {
        gap: 0;
    }


    .kc-library-list-view .kc-folder-card {
        min-height: 96px;

        padding: 16px 16px;

        gap: 22px;
    }


    /* Smaller background, larger actual icon */

    .kc-library-list-view .kc-folder-icon {
        flex: 0 0 54px;

        width: 54px;
        height: 54px;

        border-radius: 12px;

        font-size: 32px;
    }


    .kc-library-list-view .kc-folder-info h3 {
        font-size: 16px;

        margin-bottom: 4px;
    }


    .kc-library-list-view .kc-folder-info p {
        font-size: 12px;
    }

}

/* =========================================
   FOLDER NAVIGATION
========================================= */

.kc-folder-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.kc-folder-card:active {
    transform: scale(0.985);
}

/* =========================================
   SELECTED FOLDER
========================================= */

.kc-back-to-library {
    display: inline-flex;
    align-items: center;

    color: #168f73;
    text-decoration: none;

    font-size: 16px;
    font-weight: 600;
}

.kc-back-to-library:active {
    transform: scale(0.97);
}


.kc-selected-folder-header {
    display: flex;
    align-items: center;

    gap: 18px;

    margin-top: 10px;
    margin-bottom: 28px;
}


.kc-selected-folder-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: #eef4ff;

    font-size: 34px;
}


.kc-selected-folder-header h2 {
    margin: 0 0 5px;

    font-size: 26px;
    line-height: 1.2;
}


.kc-selected-folder-header p {
    margin: 0;

    color: #7b8792;

    font-size: 15px;
}


.kc-folder-contents {
    width: 100%;
}

/* =========================================
   FILE UPLOAD
========================================= */

.kc-library-upload-area {
    margin: 24px 0 32px;
}

.kc-upload-form {
    width: 100%;
}

.kc-upload-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.kc-upload-row input[type="file"] {
    flex: 1;
    min-width: 220px;
    padding: 12px;
    border: 1px solid #e1e5e8;
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
}

.kc-upload-row select {
    padding: 13px 16px;
    border: 1px solid #e1e5e8;
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    color: #263238;
}

.kc-upload-button {
    border: none;
    border-radius: 12px;
    padding: 13px 20px;
    background: #199b78;
    color: #fff;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.kc-upload-button:active {
    transform: scale(.98);
}


@media (max-width: 600px) {

    .kc-upload-row {
        flex-direction: column;
        align-items: stretch;
    }

    .kc-upload-row input[type="file"],
    .kc-upload-row select,
    .kc-upload-button {
        width: 100%;
        box-sizing: border-box;
    }

}

/* =========================================
   FILE ACTION MENU
   Premium file actions modal
========================================= */

.kc-file-action-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-sizing: border-box;
    background: rgba(20, 28, 38, 0.42);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;
}

.kc-file-action-overlay.kc-action-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.kc-file-action-menu {
    width: min(100%, 560px);
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 16px 14px 14px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    box-shadow:
        0 24px 70px rgba(10, 25, 40, 0.22),
        0 4px 16px rgba(10, 25, 40, 0.08);
    transform: translateY(18px) scale(0.97);
    transform-origin: center;
    transition:
        transform 0.25s cubic-bezier(.2,.8,.2,1),
        opacity 0.2s ease;
    opacity: 0;
    scrollbar-width: none;
}

.kc-file-action-menu::-webkit-scrollbar {
    display: none;
}

.kc-file-action-overlay.kc-action-visible .kc-file-action-menu {
    transform: translateY(0) scale(1);
    opacity: 1;
}

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

.kc-file-action-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 4px 16px;
    border-bottom: 1px solid #dddddd;
    margin-bottom: 10px;
}

.kc-file-action-file-info {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.kc-file-action-file-icon-wrap {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 19px;
    background: transparent;
    overflow: hidden;
}

.kc-file-action-file-icon {
    width: 68px;
    height: 68px;
    display: block;
    object-fit: contain;
}

.kc-file-action-file-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kc-file-action-header strong {
    display: block;
    min-width: 0;
    max-width: 360px;
    color: #10213a;
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kc-file-action-file-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    color: #74808d;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;
}

.kc-file-action-meta-dot {
    color: #aab2b9;
}

.kc-action-close {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d2d2d2;
    border-radius: 50%;
    background: #f7f7f7;
   /* background:transparent; */
    color: #515151;
    font-family: Arial, sans-serif;
    font-size: 36px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.kc-action-close:hover {
    background: #e8ebee;
}

.kc-action-close:active {
    transform: scale(.94);
}

/* =========================================
   ACTION ITEMS
========================================= */

.kc-file-action-item {
    width: 100%;
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: none;
    border-radius: 17px;
    background: transparent;
    padding: 8px 10px;
    margin: 2px 0;
    color: #122039;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.kc-file-action-item:hover {
    background: #f6f9f9;
}

.kc-file-action-item:active {
    transform: scale(.992);
}

.kc-action-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
}

.kc-action-icon img {
    width: 40px;
    height: 40px;
    display: block;
    object-fit: contain;
}

.kc-action-icon-open {
    background: #eaf8f3;
}

.kc-action-icon-details {
    background: #e7f1ff;
}

.kc-action-icon-edit {
    background: #fff4dc;
}

.kc-action-icon-download {
    background: #eee8ff;
}

.kc-action-icon-rename {
    background: #fff4dc;
}

.kc-action-icon-move {
    background: #e6f7ee;
}

.kc-action-icon-copy {
    background: #e7f1ff;
}

.kc-action-icon-delete {
    background: #ffebeb;
}

.kc-file-action-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kc-file-action-title {
    display: block;
    color: #101f38;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 600;
}

.kc-file-action-subtitle {
    display: block;
    margin-top: 5px;
    color: #788391;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 500;
}

.kc-file-action-arrow {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0 5px 2px 8px;
    color: #687586;
    font-family: Arial, sans-serif;
    font-size: 39px;
    font-weight: 300;
    line-height: .8;
}

.kc-file-action-divider {
    height: 1px;
    margin: 8px 10px 7px;
    background: #e9edf0;
}

.kc-file-action-delete-item {
    background: #fff6f6;
}

.kc-file-action-delete-item:hover {
    background: #fff0f0;
}

.kc-file-action-delete-item .kc-file-action-title {
    color: #d1272d;
}

.kc-file-action-delete-item .kc-file-action-subtitle {
    color: #9c6568;
}

.kc-file-action-delete-item .kc-file-action-arrow {
    color: #c52b31;
}

@media (max-width: 600px) {

    .kc-file-action-overlay {
        padding: 10px;
    }

    .kc-file-action-menu {
        width: 100%;
        max-height: calc(100vh - 20px);
        padding: 13px 10px 10px;
        border-radius: 16px;
    }

    .kc-file-action-header {
        min-height: 76px;
        padding: 3px 4px 14px;
        gap: 10px;
    }

    .kc-file-action-file-info {
        gap: 12px;
    }

    .kc-file-action-file-icon-wrap {
        width: 62px;
        height: 62px;
        flex-basis: 62px;
        border-radius: 17px;
    }

    .kc-file-action-file-icon {
        width: 58px;
        height: 58px;
    }

    .kc-file-action-header strong {
        max-width: calc(100vw - 175px);
        font-size: 17px;
    }

    .kc-file-action-file-meta {
        margin-top: 6px;
        font-size: 13px;
    }

    .kc-action-close {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        font-size: 29px;
    }

    .kc-file-action-item {
        min-height: 67px;
        gap: 13px;
        padding: 7px 8px;
        border-radius: 15px;
    }

    .kc-action-icon {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
        border-radius: 12px;
    }

    .kc-action-icon img {
        width: 35px;
        height: 35px;
    }

    .kc-file-action-title {
        font-size: 17px;
    }

    .kc-file-action-subtitle {
        margin-top: 4px;
        font-size: 13px;
    }

    .kc-file-action-arrow {
        font-size: 36px;
        padding-left: 5px;
    }

}

/* =========================================
   PREVENT PAGE SCROLL WHILE MENU OPEN
========================================= */

body.kc-action-open {

    overflow: hidden;
}


/* =========================================
   FOLDER PAGE
========================================= */

.kc-folder-page {
    width: 100%;
    padding: 12px 0 50px;
    box-sizing: border-box;
}


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

.kc-folder-page-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    /*margin-bottom: 24px;*/
    box-sizing: border-box;
}


/* =========================================
   BACK ARROW
========================================= */

.kc-folder-back {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    margin: 0;
    padding: 0;

    color: #10243e;
    text-decoration: none;

    font-size: 36px;
    font-weight: 500;
    line-height: 1;

    box-sizing: border-box;
}


/* =========================================
   TITLE
========================================= */

.kc-folder-page-header h1 {
    flex: 0 0 auto;

    margin: 0;
    padding: 0;

    font-family: 'Poppins', sans-serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;

    color: #10243e;

    white-space: nowrap;
}


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

.kc-folder-search {
    position: relative;

    width: 280px;
    flex: 0 0 280px;

    height: 48px;

    margin-left: auto;

    box-sizing: border-box;
}


.kc-folder-search svg {
    position: absolute;

    left: 16px;
    top: 50%;

    width: 21px;
    height: 21px;

    transform: translateY(-50%);

    fill: none;
    stroke: #10243e;
    stroke-width: 2;

    pointer-events: none;
}


.kc-folder-search input {
    width: 100%;
    height: 100%;

    padding: 0 16px 0 50px;

    box-sizing: border-box;

    border: 1px solid #cfd5dc;
    border-radius: 10px;

    background: #fff;

    color: #10243e;

    font-family: 'Inter', sans-serif;
    font-size: 16px;

    outline: none;
}


.kc-folder-search input::placeholder {
    color: #a7adb5;
}


.kc-folder-search input:focus {
    border-color: #159579;
}


/* =========================================
   FILE LIST
========================================= */

.kc-folder-contents {
    width: 100%;
}

.kc-folder-contents .kc-library-file {
    margin-bottom: 8px;
}


/* =========================================
   TABLET
   ← Documents                         Search
========================================= */

@media (min-width: 601px) and (max-width: 1000px) {

    .kc-folder-page {
        padding: 8px 0 45px;
    }

    .kc-folder-page-header {
        gap: 11px;
       
    }

    .kc-folder-back {
        width: 38px;
        height: 38px;
        font-size: 33px;
        
       
    }

    .kc-folder-page-header h1 {
        font-size: 30px;
    }

    .kc-folder-search {
        width: 280px;
        flex: 0 0 280px;
        height: 50px;
    }
}


/* =========================================
   MOBILE
   ← Documents
   Search
========================================= */

@media (max-width: 600px) {

    .kc-folder-page {
        padding: 0 0 35px;
    }

    .kc-folder-page-header {
        display: flex;
        flex-wrap: wrap;
        padding-left: 0;
        transform: translateX(-20px);

        gap: 2px;

        /*margin-bottom: 22px;*/
        
    }

    .kc-folder-back {
        width: 34px;
        height: 34px;

        font-size: 32px;
        font-weight:600;
        
        transform: translateY(-5px);
    }

    .kc-folder-page-header h1 {
        font-size: 25px;
        line-height: 2.5;
        
    
    }

    .kc-folder-search {
        order: 3;

        width: 100%;
        flex: 0 0 100%;

        height: 52px;

        margin-left: 20px;
        
        /*transform: translateX(8px);*/
    }
}

/* =========================================
   FOLDER HEADER ACTION
========================================= */

.kc-add-folder-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    height: 40px;

    padding: 0 16px;

    border: 0;
    border-radius: 10px;

    background: #159579;
    color: #ffffff;

    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.kc-add-folder-btn span {
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
}

.kc-add-folder-btn:hover {
    background: #12836b;
}

.kc-add-folder-btn:active {
    transform: scale(0.97);
}


/* =========================================
   CREATE FOLDER MODAL
========================================= */

.kc-folder-modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(16, 36, 62, 0.35);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;

    box-sizing: border-box;
}

.kc-folder-modal-open {
    opacity: 1;
    visibility: visible;
}


/* =========================================
   MODAL BOX
========================================= */

.kc-folder-modal-box {
    width: 100%;
    max-width: 430px;

    padding: 24px;

    border-radius: 18px;

    background: #ffffff;

    box-sizing: border-box;

    box-shadow:
        0 20px 50px rgba(16, 36, 62, 0.18);

    transform: translateY(10px);

    transition:
        transform 0.2s ease;
}

.kc-folder-modal-open
.kc-folder-modal-box {
    transform: translateY(0);
}


/* =========================================
   MODAL HEADER
========================================= */

.kc-folder-modal-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 22px;
}

.kc-folder-modal-header h3 {
    margin: 0;

    color: #10243e;

    font-family: 'Poppins', sans-serif;

    font-size: 21px;
    font-weight: 700;
}


.kc-folder-modal-close {
    width: 34px;
    height: 34px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #f1f4f6;

    color: #6f7a84;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;
}


/* =========================================
   FOLDER NAME
========================================= */

.kc-folder-modal-box label {
    display: block;

    margin-bottom: 8px;

    color: #10243e;

    font-family: 'Inter', sans-serif;

    font-size: 14px;
    font-weight: 600;
}


.kc-folder-modal-box input[type="text"] {
    width: 100%;
    height: 48px;

    padding: 0 14px;

    box-sizing: border-box;

    border: 1px solid #cfd5dc;
    border-radius: 10px;

    background: #ffffff;

    color: #10243e;

    font-family: 'Inter', sans-serif;
    font-size: 16px;

    outline: none;
}

.kc-folder-modal-box input[type="text"]:focus {
    border-color: #159579;
}


/* =========================================
   MODAL BUTTONS
========================================= */

.kc-folder-modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 20px;
}


.kc-folder-cancel-btn,
.kc-folder-create-btn {
    height: 44px;

    padding: 0 18px;

    border-radius: 10px;

    font-family: 'Inter', sans-serif;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}


.kc-folder-cancel-btn {
    border: 1px solid #d7dde2;

    background: #ffffff;

    color: #66727c;
}


.kc-folder-create-btn {
    border: 0;

    background: #159579;

    color: #ffffff;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .kc-add-folder-btn {
        height: 32px;

        padding: 0 13px;

        font-size: 14px;
    }

    .kc-folder-modal {
        align-items: flex-end;

        padding: 12px;
    }

    .kc-folder-modal-box {
        max-width: none;

        padding: 22px;

        border-radius: 18px 18px 14px 14px;
    }

    .kc-folder-modal-actions {
        display: grid;

        grid-template-columns: 1fr 1fr;
    }

    .kc-folder-cancel-btn,
    .kc-folder-create-btn {
        width: 100%;
    }

}

/* =========================================
   FOLDER LONG-PRESS MENU — PREMIUM
   Visual styling only. Existing actions/logic preserved.
========================================= */

.kc-folder-menu {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-sizing: border-box;
    background: rgba(20, 28, 38, 0.42);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;
}

.kc-folder-menu-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.kc-folder-menu-box {
    position: absolute;
    width: min(100%, 560px);
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 16px 14px 14px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 22px;
    box-shadow:
        0 24px 70px rgba(10, 25, 40, 0.22),
        0 4px 16px rgba(10, 25, 40, 0.08);
    transform: translateY(18px) scale(0.97);
    transform-origin: center;
    opacity: 0;
    transition:
        transform 0.25s cubic-bezier(.2,.8,.2,1),
        opacity 0.2s ease;
    scrollbar-width: none;
}

.kc-folder-menu-box::-webkit-scrollbar {
    display: none;
}

.kc-folder-menu-open .kc-folder-menu-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Folder header */

.kc-folder-menu-title {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 4px 16px;
    border-bottom: 1px solid #dddddd;
    margin-bottom: 10px;
}

.kc-folder-menu-folder-info {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.kc-folder-menu-folder-icon {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 19px;
    background: #fff4dc;
    font-size: 45px;
    line-height: 1;
}

.kc-folder-menu-folder-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kc-folder-menu-folder-text strong {
    display: block;
    min-width: 0;
    max-width: 360px;
    color: #10213a;
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kc-folder-menu-folder-text span {
    display: block;
    margin-top: 7px;
    color: #74808d;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;
}

.kc-folder-menu-close {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d2d2d2;
    border-radius: 50%;
    background: #f7f7f7;
    color: #515151;
    font-family: Arial, sans-serif;
    font-size: 36px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.kc-folder-menu-close:hover {
    background: #e8ebee;
}

.kc-folder-menu-close:active {
    transform: scale(.94);
}

/* Folder actions */

.kc-folder-action {
    width: 100%;
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: none;
    border-radius: 17px;
    background: transparent;
    padding: 8px 10px;
    margin: 2px 0;
    color: #122039;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.kc-folder-action:hover {
    background: #f6f9f9;
}

.kc-folder-action:active {
    transform: scale(.992);
}

.kc-folder-action-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
}

.kc-folder-action-icon img {
    width: 40px;
    height: 40px;
    display: block;
    object-fit: contain;
}

.kc-folder-action-icon-rename {
    background: #fff4dc;
}

.kc-folder-action-icon-move {
    background: #e6f7ee;
}

.kc-folder-action-icon-copy {
    background: #e7f1ff;
}

.kc-folder-action-icon-reorder {
    background: #eee8ff;
}

.kc-folder-action-icon-delete {
    background: #ffebeb;
}

.kc-folder-action-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kc-folder-action-title {
    display: block;
    color: #101f38;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 600;
}

.kc-folder-action-subtitle {
    display: block;
    margin-top: 5px;
    color: #788391;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 500;
}

.kc-folder-action-arrow {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0 5px 2px 8px;
    color: #687586;
    font-family: Arial, sans-serif;
    font-size: 39px;
    font-weight: 300;
    line-height: .8;
}

.kc-folder-delete {
    background: #fff6f6;
}

.kc-folder-delete:hover {
    background: #fff0f0;
}

.kc-folder-delete .kc-folder-action-title {
    color: #d1272d;
}

.kc-folder-delete .kc-folder-action-subtitle {
    color: #9c6568;
}

.kc-folder-delete .kc-folder-action-arrow {
    color: #c52b31;
}

/* =========================================
   FOLDER DIALOG
========================================= */

.kc-folder-dialog {
    position: fixed;

    inset: 0;

    z-index: 10001;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    box-sizing: border-box;

    background: rgba(16, 36, 62, 0.35);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}


.kc-folder-dialog-open {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;
}


.kc-folder-dialog-box {
    width: 100%;
    max-width: 420px;

    padding: 24px;

    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 20px 60px rgba(16, 36, 62, 0.20);

    box-sizing: border-box;
}


.kc-folder-dialog-box h3 {
    margin: 0 0 20px;

    color: #10243e;

    font-family: 'Poppins', sans-serif;

    font-size: 21px;
}


.kc-folder-dialog-box input,
.kc-folder-dialog-box select {
    width: 100%;

    height: 48px;

    padding: 0 14px;

    box-sizing: border-box;

    border: 1px solid #d0d6dc;

    border-radius: 10px;

    background: #ffffff;

    color: #10243e;

    font-family: 'Inter', sans-serif;

    font-size: 16px;

    outline: none;
}


.kc-folder-dialog-box input:focus,
.kc-folder-dialog-box select:focus {
    border-color: #159579;
}


.kc-folder-dialog-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 20px;
}


.kc-dialog-cancel,
.kc-dialog-confirm {
    height: 44px;

    padding: 0 18px;

    border-radius: 10px;

    font-family: 'Inter', sans-serif;

    font-weight: 600;

    cursor: pointer;
}


.kc-dialog-cancel {
    border: 1px solid #d6dce0;

    background: #ffffff;

    color: #68757f;
}


.kc-dialog-confirm {
    border: 0;

    background: #159579;

    color: #ffffff;
}


/* =========================================
   REORDER
========================================= */

.kc-reorder-help {
    margin: -10px 0 16px;

    color: #89939c;

    font-size: 14px;
}


.kc-reorder-list {
    display: flex;

    flex-direction: column;

    gap: 8px;

    max-height: 350px;

    overflow-y: auto;
}


.kc-reorder-item {
    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 48px;

    padding: 0 14px;

    border: 1px solid #e1e5e8;

    border-radius: 10px;

    background: #fafbfb;

    color: #10243e;

    cursor: grab;

    user-select: none;
}


.kc-reorder-item:active {
    cursor: grabbing;
}


.kc-drag-icon {
    color: #9ba5ac;

    font-size: 18px;

    letter-spacing: -4px;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .kc-folder-menu {
        display: flex;

        align-items: flex-end;
    }

    .kc-folder-menu-box {
        position: absolute;

        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        top: auto !important;

        width: auto;

        min-width: 0;

        border-radius: 22px;
    }


    .kc-folder-action {
        min-height: 82px;
        padding: 10px;
        font-size: 16px;
    }


    .kc-folder-action-icon {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }


    .kc-folder-action-icon img {
        width: 40px;
        height: 40px;
    }


    .kc-folder-menu-folder-text strong {
        max-width: calc(100vw - 190px);
    }


    .kc-folder-dialog {
        align-items: flex-end;

        padding: 12px;
    }


    .kc-folder-dialog-box {
        max-width: none;

        border-radius: 18px;
    }

}

/* =========================================================
   NESTED FOLDER CONTENTS PAGE
   ========================================================= */

.kc-folder-page-header {
    width: 100%;
}


/* =========================================================
   TITLE + SEARCH + ADD NEW
   ========================================================= */

.kc-folder-header-top {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 18px;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   TITLE
--------------------------------------------------------- */

.kc-folder-title-row {
    display: flex;
    align-items: center;
    gap: 12px;

    flex: 1 1 auto;
    min-width: 0;
}

.kc-folder-title-row h1 {
    flex: 1 1 auto !important;
    min-width: 0;

    margin: 0;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ---------------------------------------------------------
   SEARCH
--------------------------------------------------------- */

.kc-folder-header-top .kc-folder-search {
    flex: 0 0 380px;

    width: 380px;
    min-width: 0;

    margin: 0;
    padding: 4px 0;

    box-sizing: border-box;
}


/* ---------------------------------------------------------
   ADD NEW
--------------------------------------------------------- */

.kc-folder-page-add {
    flex: 0 0 auto;

    width: auto;
    min-width: max-content;

    margin: 0;

    white-space: nowrap;
}


/* =========================================================
   TABLET
   601px – 1100px

   Layout:
   ← Documents | Search | + Add New
   ========================================================= */

@media (min-width: 601px) and (max-width: 1100px) {

    .kc-folder-header-top {
        display: grid;

        /*
         * Title = remaining space
         * Search = 210px
         * Add New = natural width
         */
        grid-template-columns:
            minmax(0, 1fr)
            210px
            max-content;

        align-items: center;

        column-gap: 12px;
        row-gap: 0;

        width: 100%;
    }


    /* -----------------------------------------------------
       Title
    ----------------------------------------------------- */

    .kc-folder-title-row {
        display: flex;

        min-width: 0;
        width: 100%;

        gap: 8px;
    }

    .kc-folder-title-row h1 {
        flex: 1 1 auto !important;
        min-width: 0;

        font-size: 34px !important;
        line-height: 1.15;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


    /* -----------------------------------------------------
       Search
    ----------------------------------------------------- */

    .kc-folder-header-top .kc-folder-search {
        grid-column: 2;

        width: 210px !important;
        min-width: 0 !important;

        flex: none !important;

        margin: 0 !important;

        box-sizing: border-box;
    }


    /* -----------------------------------------------------
       Add New
    ----------------------------------------------------- */

    .kc-folder-page-add {
        grid-column: 3;

        width: max-content;
        min-width: max-content;

        flex: none !important;

        margin: 0 !important;

        white-space: nowrap;
    }

}


/* =========================================================
   MOBILE — FINAL WIDTH FIX
   Title + Add New on first row
   Search full available width below
   ========================================================= */

@media (max-width: 600px) {

    /* Force the folder header to use the actual viewport width */
    .kc-folder-page-header {
        width: calc(100vw - 42px) !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }


    /* ---------------------------------------------------------
       TITLE + ADD NEW
       --------------------------------------------------------- */

    .kc-folder-header-top {
        display: grid !important;

        grid-template-columns: minmax(0, 1fr) auto !important;

        align-items: center;

        gap: 12px;

        width: 100% !important;
        max-width: none !important;

        box-sizing: border-box;
    }


    /* Title area */

    .kc-folder-title-row {
        display: flex;

        align-items: center;

        min-width: 0 !important;
        width: 100% !important;
        
        gap: 10px;
    }


    .kc-folder-title-row h1 {
        min-width: 0 !important;
        max-width: 100%;

        margin: 0;
        
        font-size: 34px !important;
        line-height: 1.15;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
             
    }


    /* Add New */

    .kc-folder-page-add {
        flex: 0 0 auto !important;

        width: auto !important;
        max-width: none !important;

        margin: 0 !important;

        white-space: nowrap;
        
    }


    /* ---------------------------------------------------------
       SEARCH
       --------------------------------------------------------- */

    .kc-folder-header-top .kc-folder-search {
        grid-column: 1 / -1;

        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;

        flex: none !important;

        margin: 8px 0 0 8px !important;
        padding: 0 8px 0 !important;

        box-sizing: border-box;
    }
}

/* =========================================================
   NESTED FOLDER SECTION
   ========================================================= */

.kc-folder-child-section {
    width: 100%;
    margin-bottom: 15px;
}


/* =========================================================
   HIDE "FOLDERS" HEADING
   ========================================================= */

.kc-folder-child-heading {
    display: none;
}


/* =========================================================
   NESTED FOLDER LIST
   ========================================================= */

.kc-folder-child-list {
    display: flex;
    flex-direction: column;

    gap: 10px;

    width: 100%;
}


/* =========================================================
   INDIVIDUAL NESTED FOLDER
   ========================================================= */

.kc-folder-child-item {
    width: 100%;
    min-height: 80px;

    display: flex;
    align-items: center;

    padding: 12px 12px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e1e5e8;

    border-radius: 16px;

    text-decoration: none;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}


/* =========================================================
   FOLDER ICON
   ========================================================= */

.kc-folder-child-item .kc-folder-icon {
    flex: 0 0 auto;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    font-size: 28px;

    margin-right: 22px;
}


/* =========================================================
   FOLDER INFORMATION
   ========================================================= */

.kc-folder-child-item .kc-folder-info {
    min-width: 0;
    flex: 1;
}

.kc-folder-child-item .kc-folder-info h3 {
    margin: 0 0 5px;

    font-size: 18px;
    line-height: 1.2;

    font-weight: 600;

    color: #14243a;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kc-folder-child-item .kc-folder-info p {
    margin: 0;

    font-size: 13px;
    line-height: 1.3;

    color: #8a949d;
}


/* =========================================================
   MOBILE — NESTED FOLDERS
   ========================================================= 

@media (max-width: 600px) {

    .kc-folder-child-section {
        margin-top: 0px;
    }


    .kc-folder-child-item {
        min-height: 86px;

        padding: 14px 18px;

        border-radius: 14px;
    }


    .kc-folder-child-item .kc-folder-icon {
        width: 54px;
        height: 54px;

        margin-right: 18px;

        border-radius: 16px;

        font-size: 30px;
    }


    .kc-folder-child-item .kc-folder-info h3 {
        font-size: 20px;
    }


    .kc-folder-child-item .kc-folder-info p {
        font-size: 15px;
    }

}*/

@media (max-width: 600px) {

    .kc-folder-child-section {
        margin-top: 0;
    }

    .kc-folder-child-item {
        min-height: 80px;
        padding: 12px 12px;
        border-radius: 14px;
    }

    .kc-folder-child-item .kc-folder-icon {
        flex: 0 0 48px;

        width: 48px;
        height: 48px;

        margin-right: 18px;

        border-radius: 12px;

        font-size: 27px;
    }

    .kc-folder-child-item .kc-folder-info {
        min-width: 0;
        flex: 1;
    }

    .kc-folder-child-item .kc-folder-info h3 {
        margin: 0 0 4px;

        font-size: 17px;
        line-height: 1.2;
        font-weight: 600;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .kc-folder-child-item .kc-folder-info p {
        margin: 0;

        font-size: 13px;
        line-height: 1.3;
    }

}

/* =========================================================
   FINAL MOBILE FOLDER HEADER
   ========================================================= */

@media (max-width: 600px) {

    /* -----------------------------------------
       MAIN HEADER
       ----------------------------------------- 

    .kc-folder-page-header {
        width: 100% !important;

        display: block !important;

        padding: 0 !important;

        margin: 0 20px 22px 0 !important;

        transform: none !important;

        box-sizing: border-box !important;
    }


    /* -----------------------------------------
       TITLE + ADD NEW ROW
       ----------------------------------------- */

    .kc-folder-header-top {
        display: grid !important;

        grid-template-columns: minmax(0, 1fr) auto !important;

        align-items: center !important;

        column-gap: 10px !important;
        row-gap: 0 !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        box-sizing: border-box !important;
    }


    /* -----------------------------------------
       BACK ARROW + TITLE
       ----------------------------------------- */

    .kc-folder-title-row {
        display: flex !important;

        align-items: center !important;

        gap: 5px !important;

        width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 0 !important;

        box-sizing: border-box !important;
    }


    /* Back arrow */

    .kc-folder-back {
        width: 32px !important;
        height: 32px !important;

        flex: 0 0 32px !important;

        margin: 0 !important;
        padding: 0 !important;

        font-size: 30px !important;

        line-height: 1 !important;

       /* transform: none !important;
        transform: translateY(-5px);*/

        box-sizing: border-box !important;
    }


    /* Title */

    .kc-folder-title-row h1,
    .kc-folder-page-header h1 {
        min-width: 0 !important;

        max-width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        font-size: 30px !important;

        line-height: 1.15 !important;

        font-weight: 700 !important;

        white-space: nowrap !important;

        overflow: hidden !important;

        text-overflow: ellipsis !important;

        box-sizing: border-box !important;
    }


    /* -----------------------------------------
       ADD NEW BUTTON
       ----------------------------------------- */

    .kc-folder-page-add {
        width: auto !important;

        min-width: max-content !important;

        flex: 0 0 auto !important;

        margin: 0 !important;
        padding: 3px 8px !important;

        white-space: nowrap !important;
    }


    /* -----------------------------------------
       SEARCH
       ----------------------------------------- */

    .kc-folder-header-top .kc-folder-search,
    .kc-folder-search {
        grid-column: 1 / -1 !important;

        width: 100% !important;

        max-width: 100% !important;

        min-width: 0 !important;

        height: 52px !important;

        flex: none !important;

        margin: 18px 10px 0 !important;

        padding: 2px 8px !important;

        box-sizing: border-box !important;
    }


    .kc-folder-search input {
        width: 100% !important;

        box-sizing: border-box !important;
    }
}


/* =========================================================
   KEEP CANVAS — DESTINATION PICKER
   MOVE / COPY
   REPLACEMENT BLOCK
   ========================================================= */


/* ---------------------------------------------------------
   OVERLAY
   --------------------------------------------------------- */

.kc-destination-overlay {
    position: fixed !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    z-index: 99999 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 20px !important;

    box-sizing: border-box !important;

    background: rgba(16, 36, 62, 0.42) !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transition:
        opacity 0.22s ease,
        visibility 0.22s ease !important;
}


/* ---------------------------------------------------------
   OPEN OVERLAY
   --------------------------------------------------------- */

.kc-destination-overlay.kc-destination-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}


/* ---------------------------------------------------------
   MAIN MODAL
   --------------------------------------------------------- */

.kc-destination-box {
    position: relative !important;

    width: min(520px, 100%) !important;

    height: min(680px, 88vh) !important;

    max-width: 520px !important;
    max-height: 88vh !important;

    display: flex !important;
    flex-direction: column !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    background: #ffffff !important;

    border: 1px solid #e5eaee !important;

    border-radius: 26px !important;

    box-shadow:
        0 28px 80px rgba(16, 36, 62, 0.25) !important;

    overflow: hidden !important;

    transform:
        translateY(12px)
        scale(0.97) !important;

    transition:
        transform 0.22s ease !important;
}


/* ---------------------------------------------------------
   OPEN ANIMATION
   --------------------------------------------------------- */

.kc-destination-overlay.kc-destination-visible
.kc-destination-box {
    transform:
        translateY(0)
        scale(1) !important;
}


/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.kc-destination-header {
    width: 100% !important;

    min-height: 76px !important;

    display: flex !important;
    align-items: center !important;

    gap: 12px !important;

    margin: 0 !important;
    padding: 14px 18px !important;

    box-sizing: border-box !important;

    background: #ffffff !important;

    border-bottom: 1px solid #edf0f2 !important;

    flex-shrink: 0 !important;
}


/* ---------------------------------------------------------
   BACK BUTTON
   --------------------------------------------------------- */

#kc-destination-back {
    width: 42px !important;
    height: 42px !important;

    min-width: 42px !important;
    min-height: 42px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    border: none !important;
    border-radius: 50% !important;

    background: #f2f6f5 !important;

    color: #172536 !important;

    font-family: inherit !important;

    font-size: 25px !important;
    font-weight: 500 !important;

    line-height: 1 !important;

    cursor: pointer !important;

    flex-shrink: 0 !important;

    transition:
        background 0.15s ease,
        transform 0.15s ease !important;
}


#kc-destination-back:hover {
    background: #e7f2ef !important;
}


#kc-destination-back:active {
    transform: scale(0.94) !important;
}


/* ---------------------------------------------------------
   TITLE
   --------------------------------------------------------- */

#kc-destination-title {
    flex: 1 1 auto !important;

    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #172536 !important;

    font-family: 'Poppins', sans-serif !important;

    font-size: 22px !important;
    font-weight: 700 !important;

    line-height: 1.2 !important;

    white-space: nowrap !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


/* ---------------------------------------------------------
   DESTINATION TITLE / ACTION
   Keep the modal header visually clean like the native
   "Move to" picker: show only the current location title.
   The action text is still present in the DOM for existing
   JavaScript logic, but is intentionally not displayed.
   --------------------------------------------------------- */

.kc-destination-title-wrap {
    flex: 1 1 auto !important;
    min-width: 0 !important;

    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
}

#kc-destination-action {
    display: none !important;
}


/* ---------------------------------------------------------
   CLOSE BUTTON
   --------------------------------------------------------- */

#kc-destination-close {
    width: 42px !important;
    height: 42px !important;

    min-width: 42px !important;
    min-height: 42px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    border: none !important;
    border-radius: 50% !important;

    background: #f3f5f6 !important;

    color: #667381 !important;

    font-family: inherit !important;

    font-size: 25px !important;
    font-weight: 400 !important;

    line-height: 1 !important;

    cursor: pointer !important;

    flex-shrink: 0 !important;

    transition:
        background 0.15s ease,
        transform 0.15s ease !important;
}


#kc-destination-close:hover {
    background: #e9edef !important;
}


#kc-destination-close:active {
    transform: scale(0.94) !important;
}


/* ---------------------------------------------------------
   DESTINATION LIST
   --------------------------------------------------------- */

#kc-destination-list {
    width: 100% !important;

    /* The folder/file area is the only scrolling region. */
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 16px 14px !important;

    box-sizing: border-box !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;

    scrollbar-width: thin !important;
    scrollbar-color: #cfd8d5 transparent !important;

    background: #ffffff !important;
}

#kc-destination-list::-webkit-scrollbar {
    width: 6px !important;
}

#kc-destination-list::-webkit-scrollbar-track {
    background: transparent !important;
}

#kc-destination-list::-webkit-scrollbar-thumb {
    background: #cfd8d5 !important;
    border-radius: 999px !important;
}


/* ---------------------------------------------------------
   FOLDER ROW
   --------------------------------------------------------- */

.kc-destination-folder {
    width: 100% !important;

    min-height: 68px !important;

    display: flex !important;
    align-items: center !important;

    gap: 14px !important;

    margin: 0 0 6px 0 !important;
    padding: 10px 12px !important;

    box-sizing: border-box !important;

    border: none !important;
    border-radius: 16px !important;

    background: transparent !important;

    color: #172536 !important;

    font-family: inherit !important;

    text-align: left !important;

    cursor: pointer !important;

    transition:
        background 0.15s ease,
        transform 0.1s ease !important;
}


.kc-destination-folder:last-child {
    margin-bottom: 0 !important;
}


.kc-destination-folder:hover {
    background: #f5f8f8 !important;
}


.kc-destination-folder:active {
    background: #edf5f2 !important;

    transform: scale(0.99) !important;
}


/* ---------------------------------------------------------
   FOLDER ICON
   --------------------------------------------------------- */

.kc-destination-folder-icon {
    width: 48px !important;
    height: 48px !important;

    min-width: 48px !important;
    min-height: 48px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    border-radius: 14px !important;

    background: #eef4ff !important;

    font-size: 25px !important;

    line-height: 1 !important;

    flex-shrink: 0 !important;
}


/* ---------------------------------------------------------
   FOLDER NAME
   --------------------------------------------------------- */

.kc-destination-folder-name {
    flex: 1 1 auto !important;

    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #172536 !important;

    font-family: 'Poppins', sans-serif !important;

    font-size: 17px !important;
    font-weight: 600 !important;

    line-height: 1.3 !important;

    white-space: nowrap !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


/* ---------------------------------------------------------
   CHEVRON
   --------------------------------------------------------- */

.kc-destination-folder-arrow {
    width: 26px !important;

    min-width: 26px !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #89949d !important;

    font-family: inherit !important;

    font-size: 29px !important;
    font-weight: 400 !important;

    line-height: 1 !important;

    text-align: center !important;

    flex-shrink: 0 !important;
}


/* ---------------------------------------------------------
   EMPTY STATE
   --------------------------------------------------------- */

.kc-destination-empty {
    width: 100% !important;

    min-height: 180px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 30px !important;

    box-sizing: border-box !important;

    color: #89949d !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 15px !important;
    font-weight: 400 !important;

    text-align: center !important;
}


/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

.kc-destination-footer {
    width: 100% !important;

    min-height: 86px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 10px !important;

    margin: 0 !important;
    padding: 14px 18px 18px !important;

    box-sizing: border-box !important;

    background: #ffffff !important;

    border-top: 1px solid #edf0f2 !important;

    flex-shrink: 0 !important;
}


/* ---------------------------------------------------------
   NEW FOLDER BUTTON
   --------------------------------------------------------- */

#kc-destination-new-folder {
    min-width: 0 !important;
    min-height: 52px !important;
    flex: 0 0 auto !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;

    margin: 0 !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;

    border: 1px solid #dfe6e4 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    color: #172536 !important;

    font-family: 'Poppins', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;

    cursor: pointer !important;
    white-space: nowrap !important;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease !important;
}

#kc-destination-new-folder span {
    font-size: 22px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
}

#kc-destination-new-folder:hover {
    background: #f7faf9 !important;
    border-color: #cbd9d5 !important;
}

#kc-destination-new-folder:active {
    transform: scale(0.985) !important;
}


/* ---------------------------------------------------------
   SELECT THIS FOLDER
   --------------------------------------------------------- */

#kc-destination-select {
    width: 100% !important;

    min-width: 0 !important;

    min-height: 52px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 22px !important;

    box-sizing: border-box !important;

    border: none !important;

    border-radius: 16px !important;

    background: #159579 !important;

    color: #ffffff !important;

    font-family: 'Poppins', sans-serif !important;

    font-size: 16px !important;
    font-weight: 600 !important;

    line-height: 1 !important;

    cursor: pointer !important;

    transition:
        background 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease !important;
}


#kc-destination-select:hover {
    background: #12866d !important;

    box-shadow:
        0 8px 20px rgba(21, 149, 121, 0.18) !important;
}


#kc-destination-select:active {
    transform: scale(0.985) !important;
}


/* ---------------------------------------------------------
   PREVENT PAGE SCROLL
   --------------------------------------------------------- */

body.kc-destination-open {
    overflow: hidden !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    /* Keep modal CENTERED.
       Do NOT turn this into a bottom sheet. */

    .kc-destination-overlay {
        align-items: center !important;
        justify-content: center !important;

        padding:
            18px !important;
    }


    .kc-destination-box {
        width: 100% !important;
        max-width: 430px !important;

        height: min(650px, 86vh) !important;

        max-height: 86vh !important;

        border-radius: 24px !important;

        transform:
            translateY(12px)
            scale(0.97) !important;
    }


    .kc-destination-overlay.kc-destination-visible
    .kc-destination-box {
        transform:
            translateY(0)
            scale(1) !important;
    }


    /* HEADER */

    .kc-destination-header {
        min-height: 70px !important;

        padding:
            12px
            14px !important;

        gap: 9px !important;
    }


    #kc-destination-back,
    #kc-destination-close {
        width: 40px !important;
        height: 40px !important;

        min-width: 40px !important;
        min-height: 40px !important;
    }


    #kc-destination-title {
        font-size: 21px !important;
    }


    /* LIST */

    #kc-destination-list {
        padding:
            12px 10px !important;
    }


    /* FOLDER */

    .kc-destination-folder {
        min-height: 64px !important;

        margin-bottom: 5px !important;

        padding:
            8px 10px !important;

        gap: 12px !important;

        border-radius: 15px !important;
    }


    .kc-destination-folder-icon {
        width: 46px !important;
        height: 46px !important;

        min-width: 46px !important;
        min-height: 46px !important;

        border-radius: 13px !important;

        font-size: 24px !important;
    }


    .kc-destination-folder-name {
        font-size: 16px !important;
    }


    .kc-destination-folder-arrow {
        width: 24px !important;
        min-width: 24px !important;

        font-size: 27px !important;
    }


    /* FOOTER */

    .kc-destination-footer {
        min-height: 82px !important;

        padding:
            12px
            14px
            calc(14px + env(safe-area-inset-bottom))
            !important;
    }


    #kc-destination-new-folder {
        min-height: 50px !important;
        padding: 0 16px !important;
        border-radius: 15px !important;
        font-size: 15px !important;
    }


    #kc-destination-select {
        min-height: 50px !important;

        border-radius: 15px !important;

        font-size: 16px !important;
    }

}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

    .kc-destination-overlay {
        padding: 12px !important;
    }


    .kc-destination-box {
        height: 88vh !important;

        max-height: 88vh !important;

        border-radius: 22px !important;
    }


    .kc-destination-header {
        min-height: 64px !important;

        padding:
            10px
            12px !important;
    }


    #kc-destination-title {
        font-size: 19px !important;
    }


    #kc-destination-list {
        padding:
            10px 8px !important;
    }


    .kc-destination-folder {
        min-height: 60px !important;

        gap: 10px !important;
    }


    .kc-destination-folder-icon {
        width: 43px !important;
        height: 43px !important;

        min-width: 43px !important;
        min-height: 43px !important;

        font-size: 22px !important;
    }


    .kc-destination-folder-name {
        font-size: 15px !important;
    }

}


/* =========================================================
   KEEP CANVAS — CURRENT LIBRARY VIEW
   Visual refresh for the new All / Recent / Images / Docs /
   Notes / Audios / Videos tab layout.
   ========================================================= */

/* ---------- Library page base ---------- */

.kc-library {
    max-width: 1100px;
    padding: 48px 32px 125px;
    background: #f8fafb;
}

.kc-library-header {
    margin-bottom: 34px;
}

.kc-library-header h1 {
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: -1.1px;
}

/* ---------- Search ---------- */

.kc-library-search {
    height: 55px;
    border-radius: 10px;
    padding: 0 22px;
    margin-bottom: 27px;
    box-shadow: 0 2px 8px rgba(19, 34, 56, 0.04);
}

.kc-library-search svg {
    width: 25px;
    height: 25px;
}

.kc-library-search input {
    font-size: 17px;
    margin-left: 15px;
}

/* ---------- Main tab pills ---------- */

.kc-library-filters {
    gap: 10px;
    margin-bottom: 46px;
    padding-bottom: 2px;
}

.kc-library-filter {
    min-height: 48px;
    padding: 10px 25px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.1px;
}

.kc-library-filter.kc-filter-active {
    box-shadow: 0 4px 12px rgba(21, 145, 111, 0.12);
}

/* ---------- Section headings ---------- */

.kc-library-section {
    margin-bottom: 46px;
}

.kc-library-tab-heading {
    min-height: 44px;
    margin-bottom: 22px;
}

.kc-library-section-heading h2 {
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.55px;
}

.kc-library-heading-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex-shrink: 0;
}

/*
 * Markup currently outputs Toggle first and Add New second.
 * CSS visually places Add New on the left and Toggle on the right.
 */
.kc-library-heading-actions .kc-library-add-new {
    order: 1;
}

.kc-library-heading-actions .kc-library-tab-view-btn {
    order: 2;
}

.kc-library-add-new {
    min-height: 42px;
    padding: 4px 0;
    gap: 7px;
    color: #15916f;
    font-size: 18px;
    font-weight: 600;
}

.kc-library-add-new span {
    font-size: 27px;
    line-height: 1;
    font-weight: 400;
}

.kc-library-tab-view-btn {
    width: 46px;
    height: 46px;
    border: 1px solid #dfe5e8;
    border-radius: 15px;
    background: #ffffff;
    color: #15916f;
    font-size: 22px;
    box-shadow: 0 1px 2px rgba(19, 34, 56, 0.03);
}

.kc-library-tab-view-btn:hover {
    border-color: #b9dcd1;
    background: #f7fbf9;
}

/* ---------- Images / Docs sub-tabs ---------- */

.kc-library-subfilters {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -6px 0 22px;
    overflow-x: auto;
    scrollbar-width: none;
}

.kc-library-subfilters::-webkit-scrollbar {
    display: none;
}

.kc-library-subfilter {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 7px 17px;
    border: 1px solid #e1e6e9;
    border-radius: 999px;
    background: #ffffff;
    color: #687583;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kc-library-subfilter.kc-subfilter-active {
    background: #15916f;
    border-color: #15916f;
    color: #ffffff;
}

/* ---------- Folder grid ---------- */

.kc-library-folder-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.kc-folder-card {
    min-height: 214px;
    padding: 24px;
    border-radius: 22px;
    border-color: #e0e5e8;
    box-shadow: 0 1px 2px rgba(19, 34, 56, 0.02);
}

.kc-folder-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(19, 34, 56, 0.07);
}

.kc-folder-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    font-size: 39px;
}

.kc-folder-info h3 {
    margin: 20px 0 5px;
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.25px;
}

.kc-folder-info p {
    font-size: 14px;
}

/* ---------- Folder list view ---------- */

.kc-library-tab-list .kc-library-folder-grid {
    margin-top:14px;
    gap: 14px;
}

.kc-library-tab-list .kc-library-file-list {
    margin-top: 14px;
}

.kc-library-tab-list .kc-library-folder-grid .kc-folder-card {
    min-height: 96px;
    padding: 16px 22px;
    gap: 22px;
    border: 1px solid #e1e6e9;
    border-radius: 19px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(19, 34, 56, 0.02);
}

.kc-library-tab-list .kc-library-folder-grid .kc-folder-card .kc-folder-icon {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 15px;
    font-size: 33px;
}

.kc-library-tab-list .kc-library-folder-grid .kc-folder-card .kc-folder-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    align-items: flex-start;
}

.kc-library-tab-list .kc-library-folder-grid .kc-folder-card .kc-folder-info h3,
.kc-library-tab-list .kc-library-folder-grid .kc-folder-card .kc-folder-info p {
    width: 100%;
    text-align: left;
}

.kc-library-tab-list .kc-library-folder-grid .kc-folder-card .kc-folder-info h3 {
    margin: 0 0 4px;
    font-size: 19px;
}

.kc-library-tab-list .kc-library-folder-grid .kc-folder-card .kc-folder-info p {
    font-size: 13px;
}

/* ---------- File list ---------- */

.kc-library-file-list {
    gap: 13px;
}

.kc-library-file {
    min-height: 86px;
    padding: 14px 16px;
    border-radius: 18px;
    border-color: #e1e6e9;
    box-shadow: 0 1px 2px rgba(19, 34, 56, 0.02);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.kc-library-file:hover {
    border-color: #d5dfe2;
    box-shadow: 0 7px 22px rgba(19, 34, 56, 0.055);
}

.kc-file-icon {
    width: 54px;
    height: 54px;
    border-radius: 15px;
    font-size: 25px;
}

.kc-file-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.kc-file-info p {
    font-size: 13px;
}

.kc-file-more {
    width: 40px;
    height: 44px;
    font-size: 25px;
}

/* ---------- File grid view ---------- */

/*
 * The same .kc-library-file markup is used for files in every tab.
 * In grid mode turn each file into a compact file card instead of
 * a horizontal folder-like row.
 */
.kc-library-tab-grid .kc-library-file-list {
    margin-top:14px;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.kc-library-tab-grid .kc-library-file {
    min-width: 0;
    min-height: 190px;
    padding: 20px;
    border-radius: 21px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    gap: 12px;
}

.kc-library-tab-grid .kc-library-file .kc-file-icon {
    width: 64px;
    height: 64px;
    border-radius: 17px;
    font-size: 29px;
}

.kc-library-tab-grid .kc-library-file .kc-file-info {
    width: 100%;
    min-width: 0;
    padding-right: 28px;
}

.kc-library-tab-grid .kc-library-file .kc-file-info h3 {
    font-size: 16px;
    line-height: 1.3;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kc-library-tab-grid .kc-library-file .kc-file-info p {
    font-size: 12px;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kc-library-tab-grid .kc-library-file .kc-file-more {
    position: absolute;
    top: 16px;
    right: 11px;
    width: 36px;
    height: 40px;
}

/* Keep file type backgrounds visually distinct. */

.kc-file-audio {
    background: #fff6e6;
}

.kc-file-video {
    background: #f2ecff;
}

/* ---------- All tab: no "Files" heading / no empty message ---------- */

/*
 * In the All tab the second section contains root-level files.
 * Hide only its heading. Keep actual root-level files visible.
 */
.kc-library > .kc-library-section + .kc-library-section
    .kc-library-section-heading {
    display: none;
}

.kc-library > .kc-library-section + .kc-library-section
    .kc-library-empty {
    display: none;
}

/* ---------- Empty sections in other tabs ---------- */

.kc-library-empty {
    padding: 26px 8px;
    text-align: center;
    color: #7f8b96;
}

.kc-library-empty .kc-empty-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.kc-library-empty h3 {
    margin: 0 0 7px;
    color: #172536;
    font-size: 19px;
}

.kc-library-empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
    .kc-library-folder-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kc-library-tab-grid .kc-library-file-list {
        margin-top:14px;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 800px) {
    .kc-library {
        padding-left: 24px;
        padding-right: 24px;
    }

    .kc-library-folder-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kc-library-tab-grid .kc-library-file-list {
        margin-top:14px;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .kc-library {
        padding: 31px 24px 115px;
    }

    .kc-library-header {
        margin-bottom: 27px;
    }

    .kc-library-header h1 {
        font-size: 36px;
        letter-spacing: -0.9px;
    }

    .kc-library-search {
        height: 50px;
        border-radius: 10px;
        padding: 0 18px;
    }

    .kc-library-search input {
        font-size: 16px;
        margin-left: 13px;
    }

    .kc-library-filters {
        gap: 9px;
        margin-bottom: 39px;
        margin-right: -24px;
        padding-right: 24px;
    }

    .kc-library-filter {
        min-height: 47px;
        padding: 9px 23px;
        font-size: 16px;
    }

    .kc-library-tab-heading {
        min-height: 40px;
        margin-bottom: 18px;
    }

    .kc-library-section-heading h2 {
        font-size: 27px;
    }

    .kc-library-heading-actions {
        gap: 14px;
    }

    .kc-library-add-new {
        font-size: 17px;
    }

    .kc-library-tab-view-btn {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 21px;
    }

    .kc-library-subfilters {
        gap: 8px;
        margin-bottom: 18px;
        margin-right: -24px;
        padding-right: 24px;
    }

    .kc-library-subfilter {
        min-height: 36px;
        padding: 6px 15px;
        font-size: 13px;
    }

    .kc-library-folder-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .kc-folder-card {
        min-height: 165px;
        padding: 17px;
        border-radius: 18px;
    }

    .kc-folder-icon {
        width: 58px;
        height: 58px;
        border-radius: 14px;
        font-size: 32px;
    }

    .kc-folder-info h3 {
        margin-top: 15px;
        font-size: 17px;
    }

    .kc-folder-info p {
        font-size: 12px;
    }

    .kc-library-tab-list .kc-library-folder-grid {
        gap: 10px;
    }

    .kc-library-tab-list .kc-library-folder-grid .kc-folder-card {
        min-height: 82px;
        padding: 12px 14px;
        gap: 15px;
        border-radius: 15px;
    }

    .kc-library-tab-list .kc-library-folder-grid .kc-folder-card .kc-folder-icon {
        flex-basis: 54px;
        width: 54px;
        height: 54px;
        border-radius: 13px;
        font-size: 30px;
    }

    .kc-library-tab-list .kc-library-folder-grid .kc-folder-card .kc-folder-info h3 {
        font-size: 16px;
    }

    .kc-library-tab-list .kc-library-folder-grid .kc-folder-card .kc-folder-info p {
        font-size: 12px;
    }

    .kc-library-file {
        min-height: 78px;
        padding: 11px 12px;
        border-radius: 15px;
    }

    .kc-file-icon {
        width: 48px;
        height: 48px;
        border-radius: 13px;
        font-size: 22px;
    }

    .kc-file-info h3 {
        font-size: 14px;
    }

    .kc-file-info p {
        font-size: 11px;
    }

    /* Mobile file grid: two comfortable cards per row. */
    .kc-library-tab-grid .kc-library-file-list {
        margin-top:14px;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .kc-library-tab-grid .kc-library-file {
        min-height: 155px;
        padding: 15px;
        border-radius: 10px;
        gap: 12px;
    }

    .kc-library-tab-grid .kc-library-file .kc-file-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        font-size: 24px;
    }

    .kc-library-tab-grid .kc-library-file .kc-file-info h3 {
        font-size: 13px;
    }

    .kc-library-tab-grid .kc-library-file .kc-file-info p {
        font-size: 10px;
    }

    .kc-library-tab-grid .kc-library-file .kc-file-more {
        top: 10px;
        right: 7px;
    }
}

@media (max-width: 380px) {
    .kc-library {
        padding-left: 18px;
        padding-right: 18px;
    }

    .kc-library-filters {
        margin-right: -18px;
        padding-right: 18px;
    }

    .kc-library-subfilters {
        margin-right: -18px;
        padding-right: 18px;
    }

    .kc-library-heading-actions {
        gap: 10px;
    }

    .kc-library-add-new {
        font-size: 15px;
    }

    .kc-library-tab-view-btn {
        width: 39px;
        height: 39px;
    }
}


/* =========================================================
   LIBRARY V2 — FILE-MANAGER TABS + LARGE DESKTOP FILE WIDTH
   ========================================================= */

/* Main tabs: flat file-manager style with active underline.
   This changes only the main tab navigation. */
.kc-library-filters {
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 42px;
    padding: 0;
    border-bottom: 1px solid #dfe4e7;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.kc-library-filters::-webkit-scrollbar {
    display: none;
}

.kc-library-filter {
    position: relative;
    flex: 1 0 auto;
    min-width: 112px;
    min-height: 58px;
    padding: 10px 24px 14px;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #697681;
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: none !important;
    transition: color .18s ease;
}

.kc-library-filter:hover {
    color: #15916f;
}

.kc-library-filter.kc-filter-active {
    color: #15916f;
    font-weight: 600;
}

.kc-library-filter.kc-filter-active::after {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #15916f;
}

/* Keep the tab navigation responsive without changing the
   existing file/folder card layouts on smaller screens. */
@media (min-width: 901px) {
    .kc-library-filters {
        max-width: 100%;
    }

    .kc-library-filter {
        min-width: 130px;
        flex: 0 1 auto;
    }

    .kc-library-filter.kc-filter-active::after {
        left: 18px;
        right: 18px;
    }
}

/*
 * LARGE DESKTOP ONLY
 *
 * The file list becomes a compact multi-column list only on
 * genuinely large desktop screens. Tablet and mobile keep the
 * existing working CSS completely unchanged.
 */
@media (min-width: 1200px) {
    .kc-library-tab-list .kc-library-file-list {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .kc-library-tab-list .kc-library-file {
        width: 100%;
        min-width: 0;
        min-height: 84px;
        padding: 12px 14px;
        border-radius: 17px;
    }

    .kc-library-tab-list .kc-library-file .kc-file-info {
        min-width: 0;
    }

    .kc-library-tab-list .kc-library-file .kc-file-info h3 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* =========================================================
   FOLDER CONTENTS — ALWAYS USE LIST VIEW
   Recent/Grid view must not affect files inside folders.
   ========================================================= */

.kc-library-tab-grid .kc-folder-contents {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100%;
}

.kc-library-tab-grid .kc-folder-contents .kc-library-file {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 86px !important;

    padding: 14px 16px !important;

    border-radius: 18px !important;

    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: initial !important;

    gap: 13px !important;

    position: relative !important;
    box-sizing: border-box !important;
}

.kc-library-tab-grid .kc-folder-contents .kc-library-file .kc-file-icon {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;

    border-radius: 15px !important;
    font-size: 25px !important;
}

.kc-library-tab-grid .kc-folder-contents .kc-library-file .kc-file-info {
    width: auto !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;

    padding-right: 0 !important;
}

.kc-library-tab-grid .kc-folder-contents .kc-library-file .kc-file-info h3 {
    font-size: 16px !important;
    line-height: normal !important;
    margin: 0 0 5px !important;

    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.kc-library-tab-grid .kc-folder-contents .kc-library-file .kc-file-info p {
    font-size: 13px !important;
    line-height: normal !important;

    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.kc-library-tab-grid .kc-folder-contents .kc-library-file .kc-file-more {
    position: static !important;

    width: 40px !important;
    height: 44px !important;

    flex: 0 0 40px !important;

    font-size: 25px !important;
}

/* =========================================================
   LIBRARY V4 — TAB VISUAL REFINEMENT ONLY
   Based on the latest working v3 CSS.

   1. Main tabs use a rounded file-manager style container
      with icons and an active light-green tab + underline.
   2. Inner Images / Docs tabs use minimal text + underline.

   No file/folder/card/responsive layout rules are changed here.
   ========================================================= */

/* ---------- Main library tabs ---------- */

.kc-library-filters {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 0px;
    margin-top:10px;
    margin-bottom: 32px;
    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #e1e6e9;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(19, 34, 56, 0.04);

    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.kc-library-filters::-webkit-scrollbar {
    display: none;
}

.kc-library-filter {
    position: relative;
    flex: 1 0 0;
    min-width: 107px;
    min-height: 51px;
    padding: 9px 15px 11px;
    margin: 0;
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    border-right: 1px solid #e1e6e9 !important;
    border-radius: 0px !important;
    background: transparent !important;
    color: #697681;

    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;

    box-shadow: none !important;
    transition:
        color .18s ease,
        background-color .18s ease;
}

.kc-library-filter::before {
    content: "";
    width: 21px;
    height: 21px;
    flex: 0 0 21px;

    display: block;
    background-color: currentColor;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* All — grid */
.kc-library-filter:nth-child(1)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='4' width='6' height='6' rx='1'/%3E%3Crect x='14' y='4' width='6' height='6' rx='1'/%3E%3Crect x='4' y='14' width='6' height='6' rx='1'/%3E%3Crect x='14' y='14' width='6' height='6' rx='1'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='4' width='6' height='6' rx='1'/%3E%3Crect x='14' y='4' width='6' height='6' rx='1'/%3E%3Crect x='4' y='14' width='6' height='6' rx='1'/%3E%3Crect x='14' y='14' width='6' height='6' rx='1'/%3E%3C/svg%3E");
}

/* Recent — clock */
.kc-library-filter:nth-child(2)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

/* Images — picture */
.kc-library-filter:nth-child(3)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3.5' y='4' width='17' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9' r='1.5'/%3E%3Cpath d='m5.5 17 4.5-4 3.2 3 2.3-2 3 3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3.5' y='4' width='17' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9' r='1.5'/%3E%3Cpath d='m5.5 17 4.5-4 3.2 3 2.3-2 3 3'/%3E%3C/svg%3E");
}

/* Docs — document */
.kc-library-filter:nth-child(4)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 3.5h8l4 4V20.5H6z'/%3E%3Cpath d='M14 3.5v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 3.5h8l4 4V20.5H6z'/%3E%3Cpath d='M14 3.5v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E");
}

/* Notes — edit square */
.kc-library-filter:nth-child(5)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M5 4h14v12l-4 4H5z'/%3E%3Cpath d='m8 15 6.8-6.8 2 2L10 17H8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M5 4h14v12l-4 4H5z'/%3E%3Cpath d='m8 15 6.8-6.8 2 2L10 17H8z'/%3E%3C/svg%3E");
}

/* Audios — music note */
.kc-library-filter:nth-child(6)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M9 18V6l10-2v12'/%3E%3Cellipse cx='6' cy='18' rx='3' ry='2.5'/%3E%3Cellipse cx='16' cy='16' rx='3' ry='2.5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M9 18V6l10-2v12'/%3E%3Cellipse cx='6' cy='18' rx='3' ry='2.5'/%3E%3Cellipse cx='16' cy='16' rx='3' ry='2.5'/%3E%3C/svg%3E");
}

/* Videos — play */
.kc-library-filter:nth-child(7)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Cpath d='m10 8 6 4-6 4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Cpath d='m10 8 6 4-6 4z'/%3E%3C/svg%3E");
}

.kc-library-filter:hover {
    color: #545454;
}

.kc-library-filter.kc-filter-active {
    color: #15916f;
    font-weight: 600;
   /* background: #eaf7f3 !important;*/
}

.kc-library-filter.kc-filter-active::after {
    content: "";
    position: absolute;
    left:5%;
    right:5%;
    bottom: 0;
    width: auto;
    height: 3px;
    transform: none;
    border-radius: 999px;
    background: #15916f;
}

/* ---------- Inner section tabs ---------- */

.kc-library-subfilters {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin: 1px 0 25px;
    padding: 0 4px;

    border: 1px solid #e5e9eb;
    border-radius:7px;
    overflow-x: auto;
    scrollbar-width: none;
    background:#fff;
}

.kc-library-subfilters::-webkit-scrollbar {
    display: none;
}

.kc-library-subfilter {
    position: relative;
    flex: 0 0 auto;
    min-height: 32px;
    margin-left:10px;
    padding: 12px 10px 8px;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #7a858e;

    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-shadow: none !important;
}

.kc-library-subfilter:hover {
    color: #545454;
}

.kc-library-subfilter.kc-subfilter-active {
    color: #15916f;
    font-weight: 600;
}

.kc-library-subfilter.kc-subfilter-active::after {
    content: "";
    position: absolute;
    left: 2%;
    right: 2%;
    bottom: -0.5px;
    height: 3px;
    border-radius: 999px;
    background: #15916f;
}

/* Keep the same visual language on smaller screens without changing
   the existing mobile/tablet file or folder layouts. */
@media (max-width: 600px) {
    .kc-library-filters {
        padding: 0px;
        border-radius: 10px;
    }

    .kc-library-filter {
        min-width: 98px;
        min-height: 45px;
        padding: 8px 13px 10px;
        font-size: 15px;
    }

    .kc-library-filter::before {
        width: 19px;
        height: 19px;
        flex-basis: 19px;
    }

    .kc-library-subfilters {
        gap: 5px;
    }

    .kc-library-subfilter {
        font-size: 14px;
    }
}


/* KEEP CANVAS — LIBRARY CONTROLS FINAL
   Append this block to the END of library.css.
   Only styles Add New + Grid/List toggle. */

.kc-library-heading-actions {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:18px !important;
    flex-shrink:0 !important;
}
.kc-library-heading-actions .kc-library-add-new { order:1 !important; }
.kc-library-heading-actions .kc-library-tab-view-btn { order:2 !important; }

/* Premium outlined Add New button */
.kc-library-add-new {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:max-content !important;
    min-height:42px !important;
    padding:7px 15px !important;
    box-sizing:border-box !important;
    border:1px solid #c4c4c4 !important;
    border-radius:8px !important;
    background:#fff !important;
    color:#697681 !important;
    font-family:'Inter',sans-serif !important;
    font-size:15px !important;
    font-weight:600 !important;
    line-height:1 !important;
    gap:7px !important;
    cursor:pointer !important;
    white-space:nowrap !important;
    text-decoration:none !important;
   /* box-shadow:none !important;
    box-shadow: 0 2px 8px rgba(19,34,56,0.04) !important;*/
    transition:background-color .18s ease,transform .12s ease !important;
}
.kc-library-add-new > span {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:20px !important;
    height:20px !important;
    margin:0 !important;
    padding:0 !important;
    color:currentColor !important;
    font-size:27px !important;
    font-weight:400 !important;
    line-height:20px !important;
}
.kc-library-add-new:hover { 
    color:#15916f !important; 
    border-color:#15916f !important;                        
}
.kc-library-add-new:active { transform:scale(.97) !important; }

/* Grid/List toggle: transparent button with crisp SVG icon */
.kc-library-tab-view-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid #C4C4C4 !important;
    border-radius: 8px !important;
    background: #ffffff !important;

    color: #697681 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    /*box-shadow: 0 2px 8px rgba(19,34,56,0.04) !important;*/
    cursor: pointer !important;

    transition:
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .12s ease !important;
}

.kc-library-tab-view-btn:hover {
    color:#15916f !important;
    border-color: #15916f !important;
    background: #ffffff !important;
    box-shadow: 0 2px 6px rgba(19,34,56,0.05) !important;
}



.kc-library-tab-view-btn::before {
    content:"" !important;
    display:block !important;
    width:25px !important;
    height:25px !important;
    flex:0 0 25px !important;
    background-color:currentColor !important;
    -webkit-mask-repeat:no-repeat !important;
    mask-repeat:no-repeat !important;
    -webkit-mask-position:center !important;
    mask-position:center !important;
    -webkit-mask-size:contain !important;
    mask-size:contain !important;
    pointer-events:none !important;
}

/* Current view = GRID → show LIST icon */
.kc-library-tab-view-btn[aria-pressed="false"]::before {
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='4' height='4' rx='.5'/%3E%3Crect x='9' y='4.5' width='12' height='3' rx='1'/%3E%3Crect x='3' y='10' width='4' height='4' rx='.5'/%3E%3Crect x='9' y='10.5' width='12' height='3' rx='1'/%3E%3Crect x='3' y='16' width='4' height='4' rx='.5'/%3E%3Crect x='9' y='16.5' width='12' height='3' rx='1'/%3E%3C/svg%3E") !important;
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='4' height='4' rx='.5'/%3E%3Crect x='9' y='4.5' width='12' height='3' rx='1'/%3E%3Crect x='3' y='10' width='4' height='4' rx='.5'/%3E%3Crect x='9' y='10.5' width='12' height='3' rx='1'/%3E%3Crect x='3' y='16' width='4' height='4' rx='.5'/%3E%3Crect x='9' y='16.5' width='12' height='3' rx='1'/%3E%3C/svg%3E") !important;
}

/* Current view = LIST → show GRID icon */
.kc-library-tab-view-btn[aria-pressed="true"]::before {
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E") !important;
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E") !important;
}
.kc-library-tab-view-btn:active { transform:scale(.92) !important; }

@media (max-width:600px) {
    .kc-library-heading-actions { gap:12px !important; }
    .kc-library-add-new {
        min-height:35px !important;
        padding:3px 13px !important;
        font-size:14px !important;
        border-radius:8px !important;
    }
    
    .kc-library-tab-view-btn {
        width:35px !important;
        height:35px !important;
        min-width:35px !important;
        min-height:35px !important;
    }
    
    .kc-library-tab-view-btn::before {
        width:17px !important;
        height:17px !important;
        flex-basis:17px !important;
    }
    
}


/* =========================================================
   EMPTY STATE — KEEP IDENTICAL IN GRID AND LIST VIEWS
   ========================================================= */

.kc-library-tab-grid .kc-library-file-list > .kc-library-empty {
    grid-column: 1 / -1 !important;

    width: 100% !important;
    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box !important;

    text-align: center !important;
}



/* =========================================================
   KEEP CANVAS — MOVE / COPY DESTINATION CONTENTS
   PREMIUM V5
   ---------------------------------------------------------
   Visual-only refinement for folders and files INSIDE the
   Move / Copy destination picker.

   No existing rules are removed or replaced. This block is
   intentionally appended so the existing picker behaviour,
   AJAX folder creation, scrolling and buttons remain intact.
   ========================================================= */


/* ---------------------------------------------------------
   DESTINATION LIST — CLEANER CONTENT AREA
   --------------------------------------------------------- */

#kc-destination-list {
    padding: 14px 12px 16px !important;
    background:
        linear-gradient(
            180deg,
            #fbfcfc 0%,
            #ffffff 18%,
            #ffffff 100%
        ) !important;
}


/* ---------------------------------------------------------
   FOLDER — PREMIUM ROW
   --------------------------------------------------------- */

.kc-destination-folder {
    position: relative !important;

    min-height: 72px !important;

    margin: 0 0 8px 0 !important;
    padding: 9px 10px !important;

    gap: 12px !important;

    border: 1px solid #e8edeb !important;
    border-radius: 17px !important;

    background: #ffffff !important;

    box-shadow:
        0 1px 2px rgba(18, 37, 54, 0.025) !important;

    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.12s ease !important;
}


/* Folder hover / touch feedback */

.kc-destination-folder:hover {
    background: #fbfdfc !important;

    border-color: #dce7e3 !important;

    box-shadow:
        0 5px 16px rgba(18, 37, 54, 0.055) !important;
}


.kc-destination-folder:active {
    background: #f4faf7 !important;

    border-color: #d3e5df !important;

    transform: scale(0.992) !important;
}


/* ---------------------------------------------------------
   FOLDER ICON
   --------------------------------------------------------- */

.kc-destination-folder-icon {
    width: 48px !important;
    height: 48px !important;

    min-width: 48px !important;
    min-height: 48px !important;

    border-radius: 14px !important;

    background:
        linear-gradient(
            145deg,
            #edf4ff 0%,
            #e8f1ff 100%
        ) !important;

    font-size: 25px !important;

    box-shadow:
        inset 0 0 0 1px rgba(83, 116, 160, 0.035) !important;
}


/* ---------------------------------------------------------
   FOLDER INFORMATION
   --------------------------------------------------------- */

.kc-destination-folder-info {
    min-width: 0 !important;

    flex: 1 1 auto !important;

    display: flex !important;
    align-items: center !important;

    gap: 7px !important;
}


.kc-destination-folder-name {
    min-width: 0 !important;

    flex: 1 1 auto !important;

    overflow: hidden !important;

    text-overflow: ellipsis !important;

    white-space: nowrap !important;

    color: #172536 !important;

    font-family: 'Poppins', sans-serif !important;

    font-size: 16px !important;

    font-weight: 650 !important;

    line-height: 1.25 !important;
}


/* Item count becomes a quiet metadata label */

.kc-destination-folder-count {
    flex: 0 0 auto !important;

    color: #8a959e !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 12px !important;

    font-weight: 500 !important;

    line-height: 1 !important;

    white-space: nowrap !important;

    padding: 5px 7px !important;

    border-radius: 999px !important;

    background: #f4f7f6 !important;
}


/* ---------------------------------------------------------
   FOLDER ARROW
   --------------------------------------------------------- */

.kc-destination-folder-arrow {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin-left: 1px !important;

    border-radius: 10px !important;

    color: #8b969d !important;

    font-size: 28px !important;
    font-weight: 400 !important;

    line-height: 1 !important;
}


/* Give folders that can be opened a subtle directional cue */

.kc-destination-folder:hover
.kc-destination-folder-arrow {
    color: #159579 !important;
}


/* ---------------------------------------------------------
   FILE — PREMIUM ROW
   --------------------------------------------------------- */

.kc-destination-file {
    width: 100% !important;

    min-height: 68px !important;

    display: flex !important;
    align-items: center !important;

    gap: 12px !important;

    margin: 0 0 8px 0 !important;
    padding: 9px 10px !important;

    box-sizing: border-box !important;

    border: 1px solid #edf0f1 !important;
    border-radius: 17px !important;

    background: #ffffff !important;

    box-shadow:
        0 1px 2px rgba(18, 37, 54, 0.02) !important;

    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.12s ease !important;
}


.kc-destination-file:hover {
    background: #fbfcfc !important;

    border-color: #e0e7e4 !important;

    box-shadow:
        0 4px 14px rgba(18, 37, 54, 0.045) !important;
}


.kc-destination-file:active {
    background: #f7faf9 !important;

    transform: scale(0.995) !important;
}


/* ---------------------------------------------------------
   FILE ICON
   --------------------------------------------------------- */

.kc-destination-file-icon {
    width: 46px !important;
    height: 46px !important;

    min-width: 46px !important;
    min-height: 46px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box !important;

    border-radius: 13px !important;

    background: #f3f6f7 !important;

    font-size: 23px !important;

    line-height: 1 !important;

    flex-shrink: 0 !important;

    box-shadow:
        inset 0 0 0 1px rgba(18, 37, 54, 0.025) !important;
}


/* Image files */

.kc-destination-file:has(
    .kc-destination-file-icon
) .kc-destination-file-icon {
    /* Neutral default; emoji itself remains unchanged. */
}


/* ---------------------------------------------------------
   FILE INFORMATION
   --------------------------------------------------------- */

.kc-destination-file-info {
    min-width: 0 !important;

    flex: 1 1 auto !important;

    display: flex !important;
    align-items: center !important;

    gap: 8px !important;
}


.kc-destination-file-name {
    min-width: 0 !important;

    flex: 1 1 auto !important;

    overflow: hidden !important;

    text-overflow: ellipsis !important;

    white-space: nowrap !important;

    color: #243345 !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 14px !important;

    font-weight: 550 !important;

    line-height: 1.3 !important;
}


/* File type becomes a small badge */

.kc-destination-file-type {
    flex: 0 0 auto !important;

    padding: 5px 7px !important;

    border-radius: 7px !important;

    background: #f5f7f7 !important;

    color: #89949b !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 10px !important;

    font-weight: 650 !important;

    letter-spacing: 0.35px !important;

    line-height: 1 !important;

    white-space: nowrap !important;
}


/* ---------------------------------------------------------
   MOBILE — DESTINATION CONTENT
   --------------------------------------------------------- */

@media (max-width: 600px) {

    #kc-destination-list {
        padding:
            10px 9px
            14px !important;
    }


    .kc-destination-folder {
        min-height: 68px !important;

        margin-bottom: 7px !important;

        padding:
            8px 9px !important;

        gap: 10px !important;

        border-radius: 16px !important;
    }


    .kc-destination-folder-icon {
        width: 46px !important;
        height: 46px !important;

        min-width: 46px !important;
        min-height: 46px !important;

        border-radius: 13px !important;

        font-size: 24px !important;
    }


    .kc-destination-folder-info {
        gap: 5px !important;
    }


    .kc-destination-folder-name {
        font-size: 15px !important;
    }


    .kc-destination-folder-count {
        font-size: 11px !important;

        padding:
            5px 6px !important;
    }


    .kc-destination-folder-arrow {
        width: 28px !important;
        min-width: 28px !important;
        height: 30px !important;

        font-size: 26px !important;
    }


    .kc-destination-file {
        min-height: 64px !important;

        margin-bottom: 7px !important;

        padding:
            8px 9px !important;

        gap: 10px !important;

        border-radius: 16px !important;
    }


    .kc-destination-file-icon {
        width: 44px !important;
        height: 44px !important;

        min-width: 44px !important;
        min-height: 44px !important;

        border-radius: 12px !important;

        font-size: 22px !important;
    }


    .kc-destination-file-info {
        gap: 6px !important;
    }


    .kc-destination-file-name {
        font-size: 13px !important;
    }


    .kc-destination-file-type {
        padding:
            4px 6px !important;

        font-size: 9px !important;
    }

}


/* ---------------------------------------------------------
   VERY SMALL PHONES
   --------------------------------------------------------- */

@media (max-width: 380px) {

    .kc-destination-folder-name {
        font-size: 14px !important;
    }


    .kc-destination-folder-count {
        display: none !important;
    }


    .kc-destination-file-type {
        display: none !important;
    }

}

/* =========================================
   FILE DETAILS SHEET
========================================= */

.kc-file-details-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 25, 35, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}


.kc-file-details-overlay.kc-file-details-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


.kc-file-details-sheet {
    width: min(100%, 520px);
    max-height: min(78vh, 620px);
    overflow: auto;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 22px 22px 0 0;
    padding: 10px 18px 26px;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    box-shadow:
        0 -8px 30px
        rgba(20, 35, 50, 0.12);
}


.kc-file-details-overlay.kc-file-details-visible
.kc-file-details-sheet {
    transform: translateY(0);
}


.kc-file-details-header {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid #edf0f2;
    margin-bottom: 18px;
}


.kc-file-details-header strong {
    min-width: 0;
    color: #172536;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
}


.kc-file-details-close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: #f3f5f6;
    color: #667381;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}


.kc-file-details-body {
    padding: 0 4px;
}


.kc-file-details-name {
    margin: 0 0 18px;
    color: #172536;
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}


.kc-file-details-list {
    border: 1px solid #edf0f2;
    border-radius: 16px;
    overflow: hidden;
    background: #fbfcfc;
}


.kc-file-details-row {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 16px;
    box-sizing: border-box;
    border-bottom: 1px solid #edf0f2;
}


.kc-file-details-row:last-child {
    border-bottom: none;
}


.kc-file-details-label {
    flex: 0 0 auto;
    color: #7a858f;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
}


.kc-file-details-value {
    min-width: 0;
    color: #172536;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: right;
    overflow-wrap: anywhere;
}


.kc-action-info {
    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
}


@media (max-width: 600px) {

    .kc-file-details-sheet {
        max-height: 82vh;
        padding-bottom: 24px;
    }

    .kc-file-details-row {
        gap: 14px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .kc-file-details-label {
        font-size: 12.5px;
    }

    .kc-file-details-value {
        font-size: 13.5px;
    }

}
