/* Professional Pool Technical Manual Workbench - Theme Variables - v1.90 */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;

  /* Architectural Dark CAD Backdrop */
  --bg-app: #080c14;
  --bg-surface: #0f1726;
  --bg-surface-elevated: #162032;
  --bg-input: #0b111d;
  
  --border-color: #1e2c42;
  --border-subtle: #141f30;
  --border-focus: #0284c7;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-teal: #0d9488;
  --accent-danger: #ef4444;
  --accent-danger-hover: #dc2626;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;

  --topbar-height: 48px;
  --library-width: 250px;
  --panel-width: 320px;
  --shell-nav-width: 240px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

#app-shell-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  width: 480px;
  max-width: 92vw;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: slideUp 0.15s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer {
  padding: 14px 20px;
  background-color: rgba(8, 12, 20, 0.5);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Tag Popover */
.tag-popover {
  position: absolute;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.7);
  padding: 12px;
  width: 260px;
  max-height: 300px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tag-popover-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: 180px;
}
.tag-popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
  transition: background-color 0.15s;
}
.tag-popover-item:hover {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
}
.tag-popover-item input[type="checkbox"] {
  accent-color: var(--accent-primary);
}
