/* Control page — dark utility panel */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #111;
  color: #e8e8e8;
  min-height: 100vh;
  padding: 32px 24px;
}

a { text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; }

/* Header */
.ctrl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.ctrl-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
}

.ctrl-logo span {
  color: #555;
  font-weight: 400;
  font-size: 14px;
  margin-left: 6px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  transition: background 0.3s, box-shadow 0.3s;
  flex-shrink: 0;
}

.status-dot.connected {
  background: #00FF7F;
  box-shadow: 0 0 8px #00FF7F66;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid #222;
  margin-bottom: 28px;
}

.tab-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  background: none;
  border: none;
  position: relative;
  bottom: -1px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}

.tab-btn:hover { color: #bbb; }

.tab-btn.active {
  color: #fff;
  border-bottom-color: #00FF7F;
}

/* Panels */
.panel { display: none; }
.panel.active { display: block; }

/* Form elements */
.field { margin-bottom: 18px; }

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

textarea,
input[type="text"],
input[type="datetime-local"],
select {
  width: 100%;
  padding: 10px 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #e8e8e8;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

textarea:focus,
input:focus,
select:focus { border-color: #444; }

textarea { resize: vertical; min-height: 80px; }

.hint {
  font-size: 12px;
  color: #444;
  margin-top: 6px;
}

/* Preview */
.preview-label {
  font-size: 11px;
  font-weight: 700;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.preview-grid {
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 13px;
  line-height: 1.7;
  background: #0d0d0d;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 14px 16px;
  color: #00FF7F;
  letter-spacing: 1px;
  white-space: pre;
  overflow: hidden;
  margin-bottom: 20px;
}

/* Buttons */
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary {
  padding: 10px 22px;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.15s;
}

.btn-primary:hover { background: #ddd; }

.btn-secondary {
  padding: 10px 18px;
  background: none;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #282828;
  transition: color 0.15s, border-color 0.15s;
}

.btn-secondary:hover { color: #ccc; border-color: #444; }

.btn-danger {
  padding: 5px 10px;
  background: none;
  color: #cc3333;
  font-size: 12px;
  border: 1px solid #2a1a1a;
  border-radius: 6px;
  transition: background 0.15s;
}

.btn-danger:hover { background: #1a0808; }

/* Live display (clock / countdown readout) */
.live-display {
  font-family: 'Courier New', monospace;
  font-size: 28px;
  color: #00FFCC;
  letter-spacing: 4px;
  text-align: center;
  padding: 20px;
  background: #0d0d0d;
  border: 1px solid #222;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Queue list */
.queue-list {
  list-style: none;
  margin-bottom: 20px;
  min-height: 40px;
}

.queue-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #1a1a1a;
  border: 1px solid #242424;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: grab;
  user-select: none;
  transition: border-color 0.15s;
}

.queue-list li:active { cursor: grabbing; }
.queue-list li.drag-over { border-color: #00FF7F; }

.queue-drag-handle {
  color: #333;
  font-size: 14px;
  flex-shrink: 0;
}

.queue-item-text {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #00AAFF;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-empty {
  color: #333;
  font-size: 13px;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
}

/* Body container */
.ctrl-body {
  max-width: 600px;
  margin: 0 auto;
}

/* No-support message */
.no-support {
  color: #cc4444;
  text-align: center;
  padding: 60px 0;
  line-height: 1.8;
}
