* {
  font-family: "Comic Sans MS", "Comic Sans", cursive !important;
  box-sizing: border-box !important;
}

.with-sidebar {
  margin: 0 !important;
  padding: 0 !important;
}

.layout-wrapper {
  display: flex !important;
  height: 100vh !important;
  overflow: hidden !important;
  width: 100% !important;
}

/* Sidebar */
.sidebar {
  width: 250px !important;
  min-width: 250px !important;
  max-width: 250px !important;
  background: #1a1a2e !important;
  color: #fff !important;
  padding: 1rem !important;
  display: flex !important;
  flex-direction: column !important;
  flex-shrink: 0 !important;
  overflow-y: auto !important;
  font-size: 0.875rem !important;
}

.sidebar-header h2 {
  margin: 0 0 1.5rem 0 !important;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid #333 !important;
  font-size: 1.25rem !important;
}

.sidebar-section {
  margin-bottom: 1.5rem !important;
}

.sidebar-section h3 {
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #888 !important;
  margin: 0 0 0.5rem 0 !important;
}

.sidebar-section ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar-section li {
  margin-bottom: 0.25rem !important;
}

.sidebar-section a {
  color: #ddd !important;
  text-decoration: none !important;
  display: block !important;
  padding: 0.5rem !important;
  border-radius: 4px !important;
  transition: background-color 0.2s !important;
  font-weight: bold !important;
  font-size: 0.875rem !important;
}

.sidebar-section a:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ddd !important;
}

.sidebar-section a.is-active,
.sidebar-section a.active,
.sidebar-section a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ddd !important;
}

/* Admin section styling in sidebar */
.sidebar-admin {
  border: 2px dashed orange;
  border-radius: 4px;
  padding: 0.5rem;
}

/* Main content */
.main-content {
  flex: 1 !important;
  padding: 2rem !important;
  background: #16213e !important;
  color: #eee !important;
  overflow-y: auto !important;
  min-width: 0 !important;
}

.dashboard-content h1 {
  margin-top: 0;
}

/* Admin tools on normal pages - dashed orange border */
.admin-tool {
  border: 2px dashed orange;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: #4f46e5;
  color: #fff;
}

.btn-primary:hover {
  background: #4338ca;
}

.btn-secondary {
  background: #374151;
  color: #fff;
}

.btn-secondary:hover {
  background: #4b5563;
}

/* Console page */
.console-page {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.console-header h1 {
  margin: 0;
}

.logs-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logs-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auto-refresh-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  background: #374151;
  border-radius: 4px;
  color: #fff;
  font-size: 0.875rem;
}

.auto-refresh-toggle:has(input:checked) {
  background: #059669;
}

.auto-refresh-toggle input {
  cursor: pointer;
}

.lines-input {
  width: 70px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.console-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.logs-output {
  flex: 1;
  background: #1a1a2e;
  color: #0f0;
  padding: 1rem;
  border-radius: 4px 4px 0 0;
  overflow: auto;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.console-result {
  color: #ffd700;
}

.console-form {
  background: #1a1a2e;
  padding: 0.75rem;
  border-radius: 0 0 4px 4px;
  border-top: 1px solid #333;
}

.console-input-row {
  display: flex;
  gap: 0.5rem;
}

.console-input-wrapper {
  flex: 1;
  position: relative;
}

.console-input {
  width: 100%;
  padding: 0.5rem;
  font-family: monospace;
  font-size: 0.9rem;
  background: #0d0d1a;
  color: #0f0;
  border: 1px solid #333;
  border-radius: 4px;
}

.console-input::placeholder {
  color: #666;
}

.suggestions {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: #1a1a2e;
  border: 1px solid #333;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.suggestion {
  padding: 0.5rem;
  cursor: pointer;
  font-family: monospace;
  font-size: 0.85rem;
  color: #ddd;
}

.suggestion:hover,
.suggestion.selected {
  background: #4f46e5;
  color: #fff;
}

/* Flash messages */
.flash {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.flash-notice, .flash-success {
  background: #d4edda;
  color: #155724;
}

.flash-alert, .flash-error {
  background: #f8d7da;
  color: #721c24;
}

/* Mission Control Jobs dark theme overrides */
.main-content .section {
  background: transparent;
}

.main-content .container {
  max-width: 100%;
}

.main-content .tabs {
  background: #1a1a2e;
  border-radius: 4px;
  padding: 0.5rem;
}

.main-content .tabs a {
  color: #ddd;
  border-bottom-color: transparent;
}

.main-content .tabs a:hover {
  color: #fff;
  border-bottom-color: #4f46e5;
}

.main-content .tabs li.is-active a {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

.main-content .table {
  background: #1a1a2e;
  color: #eee;
}

.main-content .table th {
  background: #0d0d1a;
  color: #eee;
  border-color: #333;
}

.main-content .table td {
  border-color: #333;
}

.main-content .table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.main-content .box {
  background: #1a1a2e;
  color: #eee;
}

.main-content .title,
.main-content .subtitle {
  color: #eee;
}

.main-content a:not(.button) {
  color: #6366f1;
}

.main-content a:not(.button):hover {
  color: #818cf8;
}

.main-content .button.is-light {
  background: #374151;
  color: #eee;
  border-color: #4b5563;
}

.main-content .button.is-light:hover {
  background: #4b5563;
}
