/* PresentMultiControl Cloud Dashboard — matches Pi control page styling */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #1a1a2e; color: #eee;
  padding: 16px; max-width: 960px; margin: 0 auto;
}

/* Header */
header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #333;
}
header h1 { font-size: 18px; color: #aaa; }
header .user-info { font-size: 12px; color: #666; display: flex; align-items: center; gap: 10px; }
header .user-info a { color: #888; text-decoration: none; }
header .user-info a:hover { color: #eee; }

/* Status bar */
#status {
  text-align: center; padding: 6px; border-radius: 6px;
  font-size: 12px; margin-bottom: 16px;
}
#status.ok { background: #1a3a1a; color: #0f0; }
#status.err { background: #3a1a1a; color: #f44; }
#status.warn { background: #3a3a1a; color: #fa0; }

/* Section headers */
h2 {
  font-size: 14px; color: #888; margin: 20px 0 8px;
  text-transform: uppercase; letter-spacing: 1px;
}

/* Pi cards */
.pi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px; margin-bottom: 20px;
}

.pi-card {
  background: #16213e; border: 2px solid #333; border-radius: 12px;
  padding: 16px; transition: border-color 0.3s;
}
.pi-card.online { border-color: #2a5a2a; }
.pi-card.offline { border-color: #5a2a2a; }

.pi-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.pi-card-header h3 { font-size: 16px; font-weight: 600; }
.pi-card-header .pi-id { font-size: 11px; color: #666; }

.status-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
  margin-right: 6px;
}
.status-dot.online { background: #0f0; box-shadow: 0 0 6px #0f0; }
.status-dot.offline { background: #f44; box-shadow: 0 0 6px #f44; }

.pi-meta {
  font-size: 12px; color: #888; margin-bottom: 12px;
  display: flex; gap: 16px; flex-wrap: wrap;
}
.pi-meta span { white-space: nowrap; }

/* Scene buttons in Pi card */
.scene-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.scene-btn {
  padding: 10px 14px; border: 2px solid #333; border-radius: 8px;
  background: #0f1528; color: #eee; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px;
}
.scene-btn:active { transform: scale(0.97); }
.scene-btn.active { border-color: #0f0; background: #1a3a1a; }
.scene-btn .badge {
  font-size: 9px; padding: 1px 5px; border-radius: 3px;
  text-transform: uppercase; font-weight: 600;
}
.badge-slideshow { background: #2a4a2a; color: #8f8; }
.badge-website { background: #2a2a4a; color: #88f; }
.badge-video { background: #4a2a2a; color: #f88; }

/* Action buttons row */
.pi-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.action-btn {
  padding: 8px 14px; border: none; border-radius: 6px;
  cursor: pointer; font-size: 12px; font-weight: 500; transition: opacity 0.2s;
}
.action-btn:active { opacity: 0.8; }
.action-btn.blue { background: #0d47a1; color: #fff; }
.action-btn.green { background: #2a5a2a; color: #fff; }
.action-btn.red { background: #5a2a2a; color: #fff; }

/* Register form */
#register-form {
  background: #16213e; border: 1px dashed #333; border-radius: 12px;
  padding: 16px; margin-top: 16px;
}
#register-form input {
  padding: 8px; border: 1px solid #333; border-radius: 6px;
  background: #0f1528; color: #eee; font-size: 14px; width: 100%;
  margin-bottom: 8px;
}
#register-form .form-row { display: flex; gap: 8px; }
#register-form .form-row input { flex: 1; }

/* Modal overlay */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); display: none; align-items: center;
  justify-content: center; z-index: 100;
}
.modal-overlay.visible { display: flex; }
.modal {
  background: #16213e; border: 2px solid #333; border-radius: 12px;
  padding: 20px; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto;
}
.modal h3 { margin-bottom: 12px; }
.modal textarea {
  width: 100%; min-height: 300px; padding: 10px; border: 1px solid #333;
  border-radius: 6px; background: #0f1528; color: #eee; font-family: monospace;
  font-size: 13px; resize: vertical;
}
.modal .modal-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }

/* API key display */
.api-key-box {
  background: #0f1528; padding: 10px; border-radius: 6px;
  font-family: monospace; font-size: 13px; word-break: break-all;
  border: 1px solid #2a5a2a; margin: 10px 0;
}

/* Empty state */
.empty-state {
  text-align: center; padding: 40px; color: #666;
}
