/** * Management Styles * * Styles specific to assets/policies/contracts management views. */ import { css } from 'lit'; export const managementStyles = css` /* Content Management Styles */ .assets-management, .policies-management { height: 100%; display: flex; flex-direction: column; } .assets-header, .policies-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--tems-color-border-light, #e5e5e5); } .assets-header h2, .policies-header h2 { margin: 0; font-size: 1.5rem; font-weight: 600; color: var(--tems-color-text-primary, #2d2d2d); } .assets-search, .policies-search { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; } .assets-grid, .policies-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); flex: 1; align-content: start; } .asset-card, .policy-card { background: var(--tems-color-bg-card, #ffffff); border: 1px solid var(--tems-color-border-light, #e5e5e5); border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); transition: all 0.2s ease; } .asset-card:hover, .policy-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); border-color: var(--tems-color-primary-light, #f8bbd9); } /* Asset Card Styles */ .asset-id { font-family: monospace; font-size: 0.875rem; color: #666; margin-bottom: 0.5rem; word-break: break-all; } .asset-title { font-size: 1.125rem; font-weight: 600; color: #333; margin-bottom: 0.5rem; } .asset-description { color: #666; margin-bottom: 1rem; line-height: 1.4; } .asset-properties { background: #f8f9fa; padding: 0.75rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.875rem; } .asset-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; } /* Policy Card Styles */ .policy-id { font-family: monospace; font-size: 0.875rem; color: #666; margin-bottom: 0.5rem; word-break: break-all; } .policy-type { font-size: 1rem; font-weight: 600; color: #1976d2; margin-bottom: 0.5rem; } .policy-inner-id { font-family: monospace; font-size: 0.875rem; color: #999; margin-bottom: 0.75rem; } .policy-section { background: #f8f9fa; padding: 0.75rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.875rem; } .policy-rule { margin-bottom: 0.5rem; } .policy-rule:last-child { margin-bottom: 0; } .constraints { margin-top: 0.25rem; margin-left: 1rem; } .constraint { display: inline-block; background: #e3f2fd; color: #1976d2; padding: 0.125rem 0.5rem; border-radius: 12px; font-size: 0.75rem; margin-right: 0.5rem; margin-bottom: 0.25rem; } .policy-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; } /* Search and Sort Controls */ .search-input { padding: 0.75rem; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; min-width: 250px; } .sort-select { padding: 0.75rem; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; background: white; } /* Message Styles */ .message { padding: 1rem; border-radius: 6px; margin-bottom: 1rem; font-weight: 500; } .message-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; } .message-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; } /* Loading State */ .loading { display: flex; align-items: center; justify-content: center; padding: 4rem; color: #666; } .loading::after { content: ""; width: 20px; height: 20px; border: 2px solid #ddd; border-top: 2px solid #1976d2; border-radius: 50%; animation: spin 1s linear infinite; margin-left: 1rem; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* Empty State */ .empty-state { text-align: center; padding: 4rem 2rem; color: #666; } .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; } /* Modal Styles */ .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; } .modal-content { background: var(--tems-color-bg-card, #ffffff); border-radius: 12px; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); position: relative; } .modal-header { padding: 1.5rem 2rem; border-bottom: 1px solid var(--tems-color-border-light, #e5e5e5); display: flex; align-items: center; justify-content: space-between; } .modal-header h3 { margin: 0; font-size: 1.25rem; font-weight: 600; color: var(--tems-color-text-primary, #2d2d2d); } .modal-close { background: transparent; border: none; font-size: 1.5rem; cursor: pointer; color: #666; padding: 0; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: all 0.2s ease; } .modal-close:hover { background: #f0f0f0; color: #333; } .modal-body { padding: 2rem; } .modal-footer { padding: 1.5rem 2rem; border-top: 1px solid var(--tems-color-border-light, #e5e5e5); display: flex; gap: 1rem; justify-content: flex-end; } `;