
.production-catalog {
    width: 100%;
    padding-bottom: 12px;
    color: var(--np-text);
    container-type: inline-size;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.app-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--np-border);
    background: var(--np-surface);
    box-shadow: var(--np-shadow);
}

.app-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.app-card-open {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.app-card-head,
.app-card-body {
    pointer-events: none;
}

.production-edit-link {
    position: absolute;
    top: 50%;
    right: 2px;
    z-index: 2;
    display: flex;
    width: 25px;
    height: 25px;
    transform: translateY(-50%);
    pointer-events: auto;
}

.button_edition {
    display: block;
    width: 25px;
    height: 25px;
    background: center / 21px 21px no-repeat url('../../assets/images/admin/actions/edit.svg');
}

.production-edit-link:hover .button_edition {
    background-color: var(--np-accent-hover);
}

.app-title h2,
.production-detail-head h2 {
    position: relative;
    padding-right: 31px;
}

.app-card-head {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 7px;
    align-items: start;
    padding: 8px;
    border-bottom: 1px solid var(--np-border);
    background: var(--np-panel);
}

.app-icon,
.production-detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border: 1px solid var(--np-border);
    background: var(--np-surface);
    color: var(--np-accent);
    font-size: 26px;
    font-weight: 600;
}

.app-icon img,
.production-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-title {
    min-width: 0;
}

.app-title h2 {
    min-height: 22px;
    margin: 0 0 5px;
    padding: 2px 6px;
    background: var(--np-heading-accent);
    color: var(--np-heading-text);
    text-align: left;
    font-size: 14px;
    line-height: 18px;
    overflow-wrap: anywhere;
}

.app-title small {
    color: var(--np-muted);
    font-size: 11px;
}

.app-type {
    grid-column: 1 / -1;
    justify-self: start;
    max-width: 100%;
    padding: 3px 5px;
    border: 1px solid var(--np-border);
    background: var(--np-panel);
    color: var(--np-text);
    font-size: 10px;
}

.app-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 9px;
}

.app-summary {
    flex: 1;
    min-height: 54px;
    color: var(--np-text);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.app-meta span {
    padding: 3px 5px;
    border: 1px solid var(--np-border);
    background: var(--np-panel);
    font-size: 10px;
}

.app-details,
.production-links a,
.production-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 8px;
    border: 1px solid var(--np-accent);
    background: var(--np-heading-accent-soft);
    color: var(--np-text);
    text-align: center;
}

.app-details:hover,
.production-links a:hover,
.production-back:hover {
    background: var(--np-accent-hover);
}

.production-empty,
.production-detail,
.production-detail-section {
    border: 1px solid var(--np-border);
    background: var(--np-surface);
    box-shadow: var(--np-shadow);
}

.production-empty {
    padding: 18px;
    text-align: center;
}

.production-detail-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--np-border);
    background: var(--np-panel);
}

.production-detail-head h2,
.production-detail-section h3 {
    min-height: 22px;
    padding: 2px 6px;
    background: var(--np-heading-accent);
    color: var(--np-heading-text);
    text-align: left;
    font-size: 15px;
    line-height: 18px;
}

.production-detail-head p {
    color: var(--np-muted);
}

.production-detail-title {
    min-width: 0;
    flex: 1 1 auto;
}

.production-detail-title-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.production-detail-title-row h2 {
    width: auto;
    min-width: 0;
    flex: 0 1 auto;
    margin-right: 0;
    padding-right: 6px;
}

.production-detail-title-row .production-edit-link {
    position: relative;
    top: auto;
    right: auto;
    flex: 0 0 25px;
    transform: none;
}

.production-lead {
    padding: 12px;
    font-size: 16px;
    line-height: 1.45;
}

.production-detail-section {
    display: block;
    width: auto;
    max-width: none;
    margin: 0 10px 10px;
    box-shadow: none;
}

.production-detail-section div {
    padding: 10px;
    line-height: 1.45;
}

.production-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 10px 10px;
}

.production-back {
    margin: 0 10px 10px;
}

@container (max-width: 760px) {
    .app-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container (max-width: 500px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
}

@supports not (container-type: inline-size) {
    @media (max-width: 760px) {
        .app-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (max-width: 520px) {
        .app-grid {
            grid-template-columns: 1fr;
        }
    }
}
