loreal-video-optimizer/frontend/admin.css
DJP 300a67d247 Add Reset to Factory Defaults button with double confirmation
Features:
- Renamed "Reload from Server" to "Refresh Display" for clarity
- Added "Reset to Factory Defaults" button with warning icon
- Red danger button styling (matches warning theme)
- Double confirmation dialog to prevent accidental resets
- Backend endpoint to restore original 8 platforms (21 configurations)
- Deletes custom platform_specs.json file
- Restores L'Oréal documentation specifications

Functionality:
- "Refresh Display" - Reloads current specs from backend (no changes)
- "Reset to Factory Defaults" - Deletes ALL custom platforms and restores original 21 configs
- Custom platforms are saved until factory reset is triggered
- Factory defaults stored at server startup for restoration

Safety features:
- Two confirmation dialogs
- Clear warning messages
- Success feedback showing platform count restored

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 18:40:59 -04:00

431 lines
7.7 KiB
CSS

/* Admin Panel Additional Styles */
.header-actions {
margin-top: 1rem;
}
.btn-link {
color: var(--primary-yellow);
text-decoration: none;
font-weight: 600;
padding: 0.5rem 1rem;
border: 2px solid var(--primary-yellow);
border-radius: 6px;
display: inline-block;
transition: all 0.3s ease;
}
.btn-link:hover {
background-color: var(--primary-yellow);
color: var(--primary-black);
}
/* Metrics Section */
.metrics-section {
background-color: var(--secondary-black);
border-radius: 12px;
padding: 2rem;
margin-bottom: 2rem;
}
.metrics-section h2 {
font-size: 1.75rem;
font-weight: 600;
color: var(--primary-yellow);
margin-bottom: 1.5rem;
}
.metrics-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
}
.metric-card {
background-color: var(--primary-black);
border: 2px solid var(--border-color);
border-radius: 8px;
padding: 2rem;
text-align: center;
transition: all 0.3s ease;
}
.metric-card:hover {
border-color: var(--primary-yellow);
transform: translateY(-2px);
}
.metric-value {
font-size: 3rem;
font-weight: 700;
color: var(--primary-yellow);
margin-bottom: 0.5rem;
}
.metric-label {
font-size: 0.875rem;
color: var(--text-secondary);
font-weight: 500;
}
/* Actions Bar */
.actions-bar {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}
.actions-bar .btn-primary,
.actions-bar .btn-secondary {
flex: 1;
min-width: 200px;
}
.btn-danger {
background-color: transparent;
color: #ff0000;
border: 2px solid #ff0000;
}
.btn-danger:hover {
background-color: #ff0000;
color: white;
border-color: #ff0000;
}
/* Platforms Section */
.platforms-section {
margin-bottom: 3rem;
}
.platforms-section h2 {
font-size: 1.75rem;
font-weight: 600;
color: var(--primary-yellow);
margin-bottom: 1.5rem;
}
.platform-card {
background-color: var(--secondary-black);
border: 2px solid var(--border-color);
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 1.5rem;
transition: all 0.3s ease;
}
.platform-card:hover {
border-color: var(--primary-yellow);
}
.platform-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
padding-bottom: 1rem;
border-bottom: 1px solid var(--border-color);
}
.platform-title {
font-size: 1.5rem;
font-weight: 700;
color: var(--primary-yellow);
}
.platform-key {
font-size: 0.875rem;
color: var(--text-muted);
font-family: 'Courier New', monospace;
}
.platform-actions {
display: flex;
gap: 0.5rem;
}
.btn-icon {
padding: 0.5rem 1rem;
background-color: transparent;
color: var(--primary-yellow);
border: 1px solid var(--primary-yellow);
border-radius: 6px;
font-family: 'Montserrat', sans-serif;
font-size: 0.875rem;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-icon:hover {
background-color: var(--primary-yellow);
color: var(--primary-black);
}
.btn-icon.danger {
border-color: #ff0000;
color: #ff0000;
}
.btn-icon.danger:hover {
background-color: #ff0000;
color: white;
}
.platform-info {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
margin-bottom: 1rem;
}
.info-badge {
background-color: var(--primary-black);
border: 1px solid var(--border-color);
border-radius: 6px;
padding: 0.75rem;
}
.info-badge-label {
font-size: 0.75rem;
color: var(--text-muted);
margin-bottom: 0.25rem;
}
.info-badge-value {
font-size: 1rem;
color: var(--text-primary);
font-weight: 600;
}
.formats-table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
}
.formats-table th,
.formats-table td {
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
.formats-table th {
background-color: var(--primary-black);
color: var(--primary-yellow);
font-weight: 600;
font-size: 0.875rem;
}
.formats-table td {
color: var(--text-secondary);
font-size: 0.875rem;
}
.formats-table tr:hover {
background-color: rgba(255, 196, 7, 0.05);
}
/* Modal */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.9);
z-index: 1000;
overflow-y: auto;
padding: 2rem;
}
.modal-content {
background-color: var(--secondary-black);
border: 2px solid var(--primary-yellow);
border-radius: 12px;
max-width: 900px;
margin: 0 auto;
padding: 0;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1.5rem;
border-bottom: 2px solid var(--border-color);
}
.modal-header h2 {
color: var(--primary-yellow);
font-size: 1.5rem;
margin: 0;
}
.modal-close {
background: none;
border: none;
color: var(--text-primary);
font-size: 2rem;
cursor: pointer;
padding: 0;
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
transition: all 0.3s ease;
}
.modal-close:hover {
color: var(--primary-yellow);
transform: rotate(90deg);
}
.modal-body {
padding: 2rem;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-group label {
display: block;
font-size: 0.875rem;
font-weight: 600;
color: var(--text-secondary);
margin-bottom: 0.5rem;
}
.form-group h3 {
color: var(--primary-yellow);
font-size: 1.25rem;
margin: 2rem 0 1rem 0;
padding-top: 1rem;
border-top: 1px solid var(--border-color);
}
.format-config {
background-color: var(--primary-black);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 1rem;
margin-bottom: 1rem;
position: relative;
}
.format-config-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.format-config-title {
color: var(--primary-yellow);
font-weight: 600;
}
.btn-remove {
background: none;
border: none;
color: #ff0000;
font-size: 1.5rem;
cursor: pointer;
padding: 0;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
}
.btn-remove:hover {
color: #ff6666;
}
.format-fields {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
}
.format-fields .form-group {
margin-bottom: 0;
}
.modal-actions {
display: flex;
gap: 1rem;
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border-color);
}
.modal-actions .btn-primary,
.modal-actions .btn-secondary {
flex: 1;
}
/* Success/Error Messages */
.message {
padding: 1rem;
border-radius: 6px;
margin-bottom: 1rem;
font-weight: 600;
}
.message.success {
background-color: rgba(0, 255, 0, 0.1);
border: 2px solid #00ff00;
color: #00ff00;
}
.message.error {
background-color: rgba(255, 0, 0, 0.1);
border: 2px solid #ff0000;
color: #ff6666;
}
/* Empty State */
.empty-state {
text-align: center;
padding: 3rem;
color: var(--text-muted);
}
.empty-state h3 {
color: var(--text-secondary);
margin-bottom: 0.5rem;
}
/* Responsive */
@media (max-width: 768px) {
.modal {
padding: 1rem;
}
.platform-header {
flex-direction: column;
align-items: flex-start;
gap: 1rem;
}
.platform-actions {
width: 100%;
justify-content: flex-end;
}
.actions-bar {
flex-direction: column;
}
.actions-bar .btn-primary,
.actions-bar .btn-secondary {
width: 100%;
}
.format-fields {
grid-template-columns: 1fr;
}
}