/* UAOS Command Center v3 - With Governance */
* { box-sizing: border-box; }
.uaos-app { display: flex; min-height: 100vh; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f5f7fa; }
.uaos-sidebar { width: 220px; background: #1a1a2e; color: white; display: flex; flex-direction: column; }
.sidebar-header { padding: 20px; border-bottom: 1px solid #2d2d44; }
.sidebar-header .logo { font-size: 20px; font-weight: 700; }
.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-item { display: block; padding: 12px 20px; color: #a0a0b0; text-decoration: none; transition: all 0.2s; }
.nav-item:hover, .nav-item.active { background: #2d2d44; color: white; }
.sidebar-footer { padding: 15px; border-top: 1px solid #2d2d44; }
.gate-indicator { display: flex; align-items: center; gap: 8px; padding: 8px; background: rgba(255,255,255,0.05); border-radius: 6px; }
.gate-dot { width: 10px; height: 10px; border-radius: 50%; background: #fbbf24; }
.gate-indicator.open .gate-dot { background: #10b981; }
.gate-indicator.locked .gate-dot { background: #ef4444; }
.gate-indicator.restrictive .gate-dot { background: #f59e0b; }
.gate-label { font-size: 12px; color: #a0a0b0; }
.uaos-main { flex: 1; padding: 30px; overflow-y: auto; }
.uaos-panel { display: none; }
.uaos-panel.active { display: block; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.panel-header h2 { margin: 0; color: #1a1a2e; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.status-card { background: white; border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.status-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.status-dot.online { background: #10b981; box-shadow: 0 0 8px rgba(16,185,129,0.4); }
.status-dot.offline { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.status-dot.loading { background: #fbbf24; animation: pulse 1.5s infinite; }
.status-dot.locked { background: #ef4444; }
.status-dot.restrictive { background: #f59e0b; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.status-name { font-weight: 600; color: #1a1a2e; }
.status-detail { font-size: 12px; color: #6b7280; }
.btn { padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: #6366f1; color: white; }
.btn-secondary:hover { background: #4f46e5; }
.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }
.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover { background: #d97706; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-refresh { background: #f0f0f0; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; }
.btn-refresh:hover { background: #e0e0e0; }
.quick-actions, .recent-logs, .governance-section { background: white; border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.quick-actions h3, .recent-logs h3, .governance-section h3 { margin: 0 0 15px 0; font-size: 15px; color: #1a1a2e; }
.action-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.log-list { max-height: 300px; overflow-y: auto; }
.log-list.full { max-height: 600px; }
.log-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #f0f0f0; }
.log-item:last-child { border-bottom: none; }
.log-dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 12px; }
.log-dot.success { background: #10b981; }
.log-dot.failure { background: #ef4444; }
.log-dot.blocked { background: #f59e0b; }
.log-title { font-size: 13px; color: #374151; font-family: monospace; }
.asset-tabs, .bricks-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.tab-btn { padding: 10px 20px; border: 1px solid #e0e0e0; background: white; border-radius: 8px; cursor: pointer; transition: all 0.2s; }
.tab-btn:hover, .tab-btn.active { background: #3b82f6; color: white; border-color: #3b82f6; }
.assets-grid, .bricks-grid, .blueprints-grid, .pending-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.asset-card, .brick-card, .blueprint-card, .pending-card { background: white; border-radius: 10px; padding: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); transition: transform 0.2s; border: 1px solid #e5e7eb; }
.asset-card:hover, .brick-card:hover, .blueprint-card:hover, .pending-card:hover { transform: translateY(-2px); }
.card-title { font-weight: 600; color: #1a1a2e; margin-bottom: 8px; }
.card-subtitle { font-size: 13px; color: #6b7280; margin-bottom: 10px; font-family: monospace; }
.card-meta { font-size: 12px; color: #9ca3af; margin-bottom: 8px; }
.card-status { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.card-status.ready, .card-status.active { background: #d1fae5; color: #059669; }
.card-status.offline, .card-status.error { background: #fee2e2; color: #dc2626; }
.card-status.maintenance, .card-status.draft { background: #fef3c7; color: #d97706; }
.card-status.pending_review { background: #dbeafe; color: #2563eb; }
/* Gate Control */
.gate-control { padding: 20px; background: #f9fafb; border-radius: 8px; }
.gate-status-display { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.gate-big-dot { width: 40px; height: 40px; border-radius: 50%; background: #fbbf24; }
.gate-status-display.open .gate-big-dot { background: #10b981; box-shadow: 0 0 20px rgba(16,185,129,0.4); }
.gate-status-display.locked .gate-big-dot { background: #ef4444; box-shadow: 0 0 20px rgba(239,68,68,0.4); animation: pulse 1s infinite; }
.gate-status-display.restrictive .gate-big-dot { background: #f59e0b; box-shadow: 0 0 20px rgba(245,158,11,0.4); }
.gate-current { font-size: 18px; }
.gate-modified { font-size: 12px; color: #6b7280; }
.gate-actions { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.gate-reason input { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; }
/* Audit List */
.audit-list { max-height: 300px; overflow-y: auto; }
.audit-item { padding: 10px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.audit-item:last-child { border-bottom: none; }
.audit-time { color: #6b7280; font-size: 11px; }
.audit-event { font-weight: 500; color: #1a1a2e; }
.audit-actor { color: #6b7280; }
/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-content { background: white; border-radius: 12px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #e0e0e0; }
.modal-header h3 { margin: 0; }
.modal-close { font-size: 24px; cursor: pointer; color: #6b7280; }
.modal-close:hover { color: #1a1a2e; }
#add-asset-form, #approval-modal .modal-content > div:not(.modal-header) { padding: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #374151; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-group input.invalid { border-color: #ef4444; }
.form-group input.valid { border-color: #10b981; }
.validation-hint { font-size: 12px; color: #6b7280; margin-top: 4px; }
.validation-hint.error { color: #ef4444; }
.validation-hint.success { color: #10b981; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 10px; }
.loading-spinner { text-align: center; padding: 40px; color: #6b7280; }
.uaos-toast { position: fixed; bottom: 20px; right: 20px; padding: 16px 24px; border-radius: 8px; color: white; font-weight: 500; z-index: 9999; animation: slideIn 0.3s ease; }
.uaos-toast.success { background: #10b981; }
.uaos-toast.error { background: #ef4444; }
.uaos-toast.warning { background: #f59e0b; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
