imetting_frontend/src/pages/admin/PromptManagement.css

197 lines
4.1 KiB
CSS

.prompt-management {
padding: 1rem;
}
.toolbar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
}
.toolbar h2 {
font-size: 1.5rem;
font-weight: 600;
}
.prompt-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
}
.prompt-card {
background: #fff;
border: 1px solid #e9ecef;
border-radius: 8px;
padding: 1.5rem;
display: flex;
flex-direction: column;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.prompt-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 0.75rem;
}
.card-header h3 {
font-size: 1.1rem;
font-weight: 600;
margin: 0;
line-height: 1.3;
}
.card-actions {
display: flex;
gap: 0.5rem;
position: relative; /* For dropdown positioning */
}
.dropdown-trigger {
background: none;
border: none;
cursor: pointer;
color: #6c757d;
padding: 0.25rem;
border-radius: 4px;
transition: background-color 0.2s ease;
}
.dropdown-trigger:hover {
background-color: #f1f3f5;
color: #212529;
}
.dropdown-menu {
position: absolute;
top: 100%;
right: 0;
background: white;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
border: 1px solid #e2e8f0;
padding: 0.5rem;
margin-top: 0.5rem;
min-width: 120px;
z-index: 10;
display: flex;
flex-direction: column;
gap: 2px;
}
.dropdown-item {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
border: none;
background: none;
cursor: pointer;
border-radius: 4px;
font-size: 0.875rem;
font-weight: 500;
color: #374151;
text-decoration: none;
transition: all 0.2s ease;
width: 100%;
text-align: left;
}
.dropdown-item:hover {
background: #f3f4f6;
color: #111827;
}
.dropdown-item.delete-item {
color: #dc2626;
}
.dropdown-item.delete-item:hover {
background: #fef2f2;
color: #b91c1c;
}
.card-actions button {
background: none;
border: none;
cursor: pointer;
color: #6c757d;
padding: 0.25rem;
border-radius: 4px;
transition: background-color 0.2s ease;
}
.card-actions button:hover {
background-color: #f1f3f5;
color: #212529;
}
.card-tags {
margin-bottom: 1rem;
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.tag-chip {
background-color: #e9ecef;
color: #f2f0f7;
padding: 0.25rem 0.6rem;
border-radius: 12px;
font-size: 0.75rem;
}
.card-content {
font-size: 0.9rem;
color: #495057;
line-height: 1.5;
flex-grow: 1;
}
/* Reusing existing modal and form styles */
/* Ensure these are defined globally or copy them here if needed */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(5px); }
.modal-content { background: white; color: #333; padding: 2rem; border-radius: 12px; width: 90%; max-width: 600px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
.modal-content h2 { margin-top: 0; margin-bottom: 1.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; margin-bottom: 0.5rem; }
.form-group input[type="text"], .form-group textarea { width: 100%; padding: 0.75rem; border: 1px solid #ced4da; border-radius: 6px; font-size: 1rem; }
.form-group textarea { resize: vertical; }
.pagination {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 2rem;
padding-top: 1rem;
border-top: 1px solid #e9ecef;
}
.pagination button {
padding: 0.5rem 1rem;
border: 1px solid #ced4da;
background-color: #fff;
border-radius: 6px;
cursor: pointer;
}
.pagination button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.pagination span {
font-size: 0.9rem;
color: #495057;
}