/* =========================================================
   PROFESSIONAL DASHBOARD LAYOUT (Applied to Trap)
   ========================================================= */

/* Override global app-shell for full width */
.app-shell {
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex;
  flex-direction: column;
}

/* Base Dashboard Container */
.pro-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  height: calc(100vh - var(--header-h, 100px) - 40px);
  min-height: 500px;
  padding: 16px min(2vw, 24px) !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* --- HEADER BAR --- */
.pro-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--brand-border, #e2e8f0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.pro-title h1 {
  font-size: 1.4rem;
  margin: 0 0 4px 0;
  color: var(--brand-text, #1e293b);
}
.pro-title p, .settings-hint {
  font-size: 0.85rem;
  margin: 0;
  color: var(--brand-subtle-text, #64748b);
}
.settings-hint a { color: #3498db; text-decoration: none; font-weight: bold; }

/* --- 3-PANE WORKSPACE --- */
.pro-workspace {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 16px;
  flex: 1; 
  min-height: 0; 
}

.pro-panel {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

/* Common Header within Panes */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.panel-header label, .panel-header h2 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #475569;
  margin: 0;
  letter-spacing: 0.02em;
}
.icon-btn {
  background: none;
  border: none;
  color: #3498db;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.icon-btn:hover { background: #e0f2fe; }

/* Left Pane: Inputs */
#namesInput {
  flex: 1;
  resize: none;
  border: none;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  background: transparent;
  color: #334155;
}
#namesInput:focus { outline: none; background: #ffffff; }

.panel-footer {
  padding: 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.pro-primary-btn {
  width: 100%;
  padding: 14px;
  background: var(--brand-accent, linear-gradient(to bottom right, rgba(52,152,219,.9), rgba(41,128,185,.9)));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
  transition: transform 0.1s, box-shadow 0.1s;
}
.pro-primary-btn:active {
  transform: translateY(2px);
  box-shadow: 0 0 2px rgba(52, 152, 219, 0.3);
}
.pro-primary-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

/* Right Pane: Results */
.results-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}
#resultsOrderList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
#resultsOrderList li.finished-entry {
  background: #ffffff;
  border-left: 4px solid #e74c3c;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  animation: slideIn 0.2s ease-out forwards;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(15px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- CENTER PANE: GAME CANVAS --- */
.game-panel {
  display: flex;
  flex-direction: column;
  background: #e8ebed;
}

.game-container {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  min-height: 0; /* allows shrinking */
}

#gameCanvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 4px solid #334155;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  background: #f5f7f9;
  image-rendering: pixelated;
}

#office-overlay {
  position: absolute;
  top: 16px; left: 16px; right: 16px; bottom: 16px;
  pointer-events: none;
  border-radius: 6px;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
  background-size: 100% 4px, 3px 100%;
}

#info {
  background: #ffffff;
  padding: 14px 20px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  border-top: 1px solid #e2e8f0;
  min-height: 56px;
}

/* --- SEO SECTION --- */
.seo-content-area { margin-top: 3rem; padding: 0 20px; max-width: 1000px; margin-left: auto; margin-right: auto; }
.seo-content-area h2, .seo-content-area h3 { color: var(--brand-text); }
.seo-content-area ul { padding-left: 1.5rem; line-height: 1.6; }

/* --- RESPONSIVE TABLET & MOBILE --- */
@media (max-width: 1024px) {
  .pro-workspace { grid-template-columns: 200px 1fr 200px; }
}

@media (max-width: 850px) {
  .pro-dashboard { height: auto; min-height: 800px; padding: 12px; }
  .pro-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .pro-workspace { grid-template-columns: 1fr; grid-template-rows: auto 450px auto; }
  #namesInput { min-height: 120px; }
}