.collection-grid {
    display: grid;
    gap: 10px;
}

.collection-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 88px;
    padding: 10px;
    border: 1px solid #e8eaed;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 7px 22px rgba(25, 28, 33, .035);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.collection-card:hover {
    transform: translateY(-1px);
    border-color: #dfe2e6;
    box-shadow: 0 10px 28px rgba(25, 28, 33, .07);
}

.collection-card.static,
.collection-card.static:hover {
    transform: none;
    cursor: default;
    border-color: #e8eaed;
    box-shadow: 0 7px 22px rgba(25, 28, 33, .035);
}

.collection-card-art,
.collection-media-art {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    overflow: hidden;
    color: rgba(255, 255, 255, .82);
    background: linear-gradient(145deg, #303641, #171a20);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.collection-card-art {
    width: 66px;
    height: 66px;
    border-radius: 11px;
    color: #69717b;
    background: linear-gradient(145deg, #f2f3f5, #e5e8eb);
    box-shadow: inset 0 0 0 1px rgba(45, 50, 58, .035);
    font-size: 20px;
}

.collection-card-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.collection-card-placeholder svg {
    width: 27px;
    height: 27px;
}

.collection-card-art.kind-audio,
.collection-card-art.kind-video {
    color: rgba(255, 255, 255, .84);
    background: linear-gradient(145deg, #303641, #171a20);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.collection-card-art.kind-pdf,
.collection-card-art.kind-ppt {
    color: #89685d;
    background: linear-gradient(145deg, #f5f0ed, #ebe3df);
}

.collection-card-art.kind-word {
    color: #5d7088;
    background: linear-gradient(145deg, #f0f3f7, #e4eaf0);
}

.collection-card-art.kind-excel {
    color: #5d776b;
    background: linear-gradient(145deg, #eff4f1, #e2ebe6);
}

.collection-card-art.kind-archive {
    color: #786f5b;
    background: linear-gradient(145deg, #f4f2ec, #e9e5da);
}

.collection-card-art img,
.collection-media-art img {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-card-body {
    flex: 1;
    min-width: 0;
}

.collection-card-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.collection-card-title {
    overflow: hidden;
    color: #202226;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-card-description,
.collection-card-meta {
    overflow: hidden;
    color: #858a92;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-card-description {
    margin-top: 3px;
    font-size: 11px;
}

.collection-card-meta {
    margin-top: 5px;
    font-size: 10px;
}

.collection-card-action {
    flex: none;
}

.collection-detail {
    display: grid;
    gap: 14px;
}

.collection-admin-hero {
    position: relative;
    min-height: 174px;
    overflow: hidden;
    border-radius: 17px;
    color: #fff;
    background: radial-gradient(circle at 82% 10%, #4d5563 0, transparent 40%), linear-gradient(145deg, #252931, #111318);
    box-shadow: 0 16px 38px rgba(21, 24, 29, .14);
}

.collection-admin-hero-media {
    position: absolute;
    inset: -16px;
    width: calc(100% + 32px);
    height: calc(100% + 32px);
    object-fit: cover;
    filter: blur(10px) saturate(.88);
    transform: scale(1.05);
}

.collection-admin-hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 10, 13, .2) 0%, rgba(8, 10, 13, .42) 42%, rgba(8, 10, 13, .88) 100%);
}

.collection-admin-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 174px;
    padding: 15px 17px 17px;
}

.collection-admin-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.collection-admin-hero-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.collection-hero-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.collection-hero-icon:hover {
    border-color: rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .18);
}

.collection-hero-icon svg {
    width: 15px;
    height: 15px;
}

.collection-admin-heading {
    margin-top: auto;
    min-width: 0;
}

.collection-admin-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.22;
    letter-spacing: -.02em;
    word-break: break-word;
}

.collection-admin-description {
    overflow: hidden;
    margin: 5px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-admin-meta {
    margin-top: 8px;
    color: rgba(255, 255, 255, .6);
    font-size: 10px;
}

.collection-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 7px 9px;
    border: 1px solid #e8eaed;
    border-radius: 13px;
    background: #fff;
}

.collection-toolbar-label {
    flex: 1;
    min-width: 0;
    color: #858a92;
    font-size: 11px;
}

.collection-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.collection-group {
    margin-top: 3px;
}

.collection-group-header {
    display: flex;
    align-items: center;
    min-height: 30px;
    margin: 0 3px 7px;
    color: #858a92;
    font-size: 11px;
    font-weight: 600;
}

.collection-group-header > span:first-child {
    flex: 1;
}

.collection-items-panel {
    overflow: visible;
    border: 1px solid #e8eaed;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(25, 28, 33, .035);
}

.collection-media-row {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 78px;
    padding: 10px 11px;
    border-bottom: 1px solid #eff0f2;
}

.collection-media-row:last-child {
    border-bottom: 0;
}

.collection-media-row.standalone {
    margin-bottom: 7px;
    border: 1px solid #e8eaed;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(25, 28, 33, .025);
}

.collection-media-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    color: inherit;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.collection-media-art {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    font-size: 18px;
}

.collection-media-art.file {
    color: #626872;
    background: #f1f2f4;
    box-shadow: none;
}

.collection-media-body {
    flex: 1;
    min-width: 0;
}

.collection-media-name {
    display: block;
    overflow: hidden;
    color: #202226;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-media-text {
    display: -webkit-box;
    overflow: hidden;
    color: #202226;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.collection-media-meta {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: #858a92;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-media-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: none;
    margin-left: 8px;
}

.collection-action-menu {
    position: relative;
    flex: none;
}

.collection-action-menu > summary {
    list-style: none;
}

.collection-action-menu > summary::-webkit-details-marker {
    display: none;
}

.collection-action-menu[open] > summary {
    color: #202226;
    background: #f2f3f4;
}

.collection-action-popover {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    min-width: 150px;
    overflow: hidden;
    padding: 5px;
    border: 1px solid #e2e4e7;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(20, 23, 28, .16);
}

.collection-action-popover button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    color: #30343a;
    background: transparent;
    font: inherit;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
}

.collection-action-popover button:hover {
    background: #f3f4f5;
}

.collection-action-popover button.danger {
    color: #d84b40;
}

.collection-role-badge {
    flex: none;
    padding: 2px 6px;
    border-radius: 999px;
    color: #767c84;
    background: #f0f1f3;
    font-size: 9px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .collection-card {
        min-height: 80px;
        gap: 11px;
        padding: 9px;
        border-radius: 13px;
    }

    .collection-card-art {
        width: 60px;
        height: 60px;
    }

    .collection-admin-hero,
    .collection-admin-hero-content {
        min-height: 164px;
    }

    .collection-admin-hero {
        border-radius: 15px;
    }

    .collection-admin-title {
        font-size: 22px;
    }

    .collection-toolbar-actions {
        margin-left: auto;
    }

    .collection-media-row {
        min-height: 74px;
        padding: 9px;
    }

    .collection-media-art {
        width: 52px;
        height: 52px;
    }

    .collection-action-popover {
        position: fixed;
        top: auto;
        right: 10px;
        bottom: 10px;
        left: 10px;
    }
}
