/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #14b8a6;
  --secondary: #64748b;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --bg: #f8fafc;
  --bg-dark: #1e293b;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --sidebar-width: 280px;
  --header-height: 60px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* Screens */
.screen {
  min-height: 100vh;
}

/* Login Screen */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.login-container h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.login-container p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  gap: 0.5rem;
}

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

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-highlight {
  animation: pulse-highlight 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.3);
}

@keyframes pulse-highlight {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(13, 148, 136, 0.15);
  }
}

/* Strong pulse animation to draw attention when prompt is pasted/set */
.btn-pulse {
  animation: pulse-attention 0.5s ease-in-out 3 !important;
  transform: scale(1.05);
}

@keyframes pulse-attention {
  0%, 100% {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(13, 148, 136, 0.2);
  }
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background: #475569;
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-large {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.btn-block:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* Header */
.header {
  height: var(--header-height);
  background: linear-gradient(135deg, #63C5BC 0%, #187389 50%, #63C5BC 100%);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  -webkit-filter: brightness(0) invert(1);
}

.header h1 {
  font-size: 1.25rem;
  color: white;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* User Avatar */
.user-avatar-container {
  position: relative;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-avatar:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: white;
}

.user-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 0.875rem 1rem;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.user-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 14px;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

.user-avatar-container:hover .user-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tooltip-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.tooltip-email {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.tooltip-role {
  font-size: 0.75rem;
  color: white;
  background: var(--primary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

/* Help Button */
.help-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-right: 0.75rem;
}

.help-btn svg {
  width: 24px;
  height: 24px;
  stroke: rgba(255, 255, 255, 0.8);
  transition: stroke 0.2s ease;
}

.help-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.help-btn:hover svg {
  stroke: white;
}

/* Notification Bell */
.notification-container {
  position: relative;
  margin-right: 0.5rem;
}

.notification-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.notification-btn svg {
  width: 22px;
  height: 22px;
  stroke: rgba(255, 255, 255, 0.8);
  transition: stroke 0.2s ease;
}

.notification-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.notification-btn:hover svg {
  stroke: white;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow: hidden;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.notification-header span {
  font-weight: 600;
  font-size: 0.875rem;
}

.notification-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link-danger {
  color: var(--error);
}

.notification-list {
  max-height: 320px;
  overflow-y: auto;
}

.notification-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.notification-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: var(--primary);
  margin-top: 1px;
}

.notification-item-content {
  flex: 1;
  min-width: 0;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: var(--bg);
}

.notification-item.unread {
  background: rgba(13, 148, 136, 0.05);
  border-left: 3px solid var(--primary);
}

.notification-item-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.notification-item-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.notification-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Tutorial Overlay */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  pointer-events: none;
}

.tutorial-overlay.active {
  pointer-events: auto;
}

.tutorial-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.tutorial-spotlight {
  position: fixed;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  transition: all 0.4s ease;
  pointer-events: none;
  z-index: 10001;
}

.tutorial-spotlight.pulse {
  animation: spotlight-pulse 2s ease-in-out infinite;
}

@keyframes spotlight-pulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(13, 148, 136, 0.5); }
  50% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6), 0 0 0 8px rgba(13, 148, 136, 0.3); }
}

.tutorial-tooltip {
  position: fixed;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  padding: 1.25rem 1.5rem;
  max-width: 380px;
  min-width: 320px;
  z-index: 10002;
  pointer-events: auto;
  animation: tooltip-appear 0.3s ease;
}

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

.tutorial-tooltip::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  transform: rotate(45deg);
}

.tutorial-tooltip.arrow-top::before {
  top: -8px;
  left: 24px;
}

.tutorial-tooltip.arrow-bottom::before {
  bottom: -8px;
  left: 24px;
}

.tutorial-tooltip.arrow-left::before {
  left: -8px;
  top: 24px;
}

.tutorial-tooltip.arrow-right::before {
  right: -8px;
  top: 24px;
}

.tutorial-tooltip.arrow-top-right::before {
  top: -8px;
  right: 24px;
  left: auto;
}

.tutorial-tooltip.center {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
}

.tutorial-tooltip.center::before {
  display: none;
}

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

.tutorial-step-indicator {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tutorial-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.tutorial-close:hover {
  color: var(--text);
}

.tutorial-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.tutorial-description {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.tutorial-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.tutorial-nav {
  display: flex;
  gap: 0.5rem;
}

.tutorial-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 1rem;
  overflow: hidden;
}

.tutorial-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Tutorial highlight effect for target elements */
.tutorial-highlight {
  position: relative;
  z-index: 10001 !important;
  pointer-events: auto !important;
}

/* Tutorial Menu */
.tutorial-menu {
  position: fixed;
  top: 70px;
  right: 80px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  min-width: 320px;
  animation: menu-appear 0.2s ease;
}

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

.tutorial-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.tutorial-menu-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.tutorial-menu-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.tutorial-menu-close:hover {
  color: var(--text);
}

.tutorial-menu-options {
  padding: 0.5rem;
}

.tutorial-menu-option {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
}

.tutorial-menu-option:hover {
  background: var(--bg);
}

.tutorial-menu-icon {
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-menu-icon svg {
  width: 24px;
  height: 24px;
}

.tutorial-menu-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tutorial-menu-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.tutorial-menu-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Main Content */
.main-content {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* New Full-Height Layout */
.main-content-full {
  display: flex;
  margin-top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* Tabs Panel (Left Side) */
.tabs-panel {
  width: 320px;
  min-width: 240px;
  max-width: 600px;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

/* Panel Resize Handle */
.panel-resize-handle {
  width: 6px;
  background: transparent;
  cursor: col-resize;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  transition: background 0.15s;
}

.panel-resize-handle:hover,
.panel-resize-handle.resizing {
  background: var(--primary);
}

.panel-resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 40px;
  background: var(--border);
  border-radius: 1px;
  transition: background 0.15s;
}

.panel-resize-handle:hover::after,
.panel-resize-handle.resizing::after {
  background: white;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 0 1.5rem;
  min-height: 56px;
  align-items: stretch;
}

.tab-btn {
  flex: 1;
  padding: 0 0.5rem;
  background: none;
  border: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--card);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--card);
}

.tab-content {
  display: none;
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Sub-tabs within a tab */
.sub-tabs-nav {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sub-tab-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary, #475569);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.sub-tab-btn:hover {
  color: var(--text);
  background: var(--bg);
}

.sub-tab-btn.active {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.15);
  border-color: #0f766e;
  font-weight: 600;
}

.sub-tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.sub-tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Categories View */
.categories-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.category-header:hover {
  background: var(--bg);
}

.category-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--border);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
}

.category-toggle {
  color: var(--text-muted);
  transition: transform 0.2s;
}

.category-group.expanded .category-toggle {
  transform: rotate(180deg);
}

.category-reports {
  display: none;
  padding: 0.5rem;
}

.category-group.expanded .category-reports {
  display: block;
}

.uncategorized-label {
  color: var(--text-muted);
  font-style: italic;
}

/* Quick Reports Grid */
.quick-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.report-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.report-card:hover {
  border-color: var(--primary);
  background: var(--card);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.report-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 0.5rem;
  color: #0d7377;
}

.report-name {
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
}

/* Saved & Published Reports Lists */
.saved-reports-list,
.published-reports-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.report-list-item:hover {
  border-color: var(--primary);
  background: var(--card);
}

.report-list-item .item-icon {
  width: 20px;
  height: 20px;
  color: #0d7377;
  flex-shrink: 0;
}

.report-list-item .item-info {
  flex: 1;
  min-width: 0;
}

.report-list-item .item-name {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-list-item .item-date {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.report-list-item .item-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.report-list-item:hover .item-actions {
  opacity: 1;
}

.report-list-item .item-actions button {
  padding: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 4px;
}

.report-list-item .item-actions button:hover {
  background: var(--border);
  color: var(--text);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.empty-hint {
  font-size: 0.75rem;
}

/* Chat History (Left Panel for AI Tab) */
.chat-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.chat-history-header span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* AI Sync Status Indicator */
.ai-sync-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
}

.ai-sync-status .sync-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.ai-sync-status.synced .sync-indicator {
  background: var(--success, #10b981);
}

.ai-sync-status.syncing .sync-indicator {
  background: var(--warning, #f59e0b);
  animation: pulse 1s infinite;
}

.ai-sync-status.not-synced .sync-indicator {
  background: var(--text-muted);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ai-sync-status .sync-text {
  flex: 1;
  color: var(--text-muted);
}

.ai-sync-status .btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  border-radius: 4px;
}

.ai-sync-status.synced #manual-sync-btn {
  display: none;
}

.ai-sync-status.syncing #manual-sync-btn {
  display: none;
}

.chat-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  flex: 1;
}

.chat-history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-history-item:hover,
.chat-history-item.active {
  border-color: var(--primary);
  background: var(--card);
}

.chat-history-item.active {
  border-left: 3px solid var(--primary);
}

.chat-history-item .item-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

.chat-history-item .item-preview {
  flex: 1;
  min-width: 0;
}

.chat-history-item .item-title {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-history-item .item-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Chatbot Panel (Right Panel) */
.chatbot-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
}

.chatbot-panel .chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chatbot-panel .chat-message {
  max-width: 80%;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.chatbot-panel .chat-message.user {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chatbot-panel .chat-message.assistant {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chatbot-panel .chat-message p {
  margin: 0;
}

.chatbot-panel .chat-input-area {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.chatbot-panel .chat-input-area input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 0.875rem;
  background: var(--card);
}

.chatbot-panel .chat-input-area input:focus {
  outline: none;
  border-color: var(--primary);
}

.chatbot-panel .chat-input-area button {
  border-radius: 24px;
  padding: 0.75rem 1.5rem;
}

/* Report Panel Full Height */
.report-panel-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--card);
  overflow: hidden;
}

.report-content-full {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* Header Firm Selector */
.header-firm-selector {
  margin-right: 1rem;
}

.header-firm-selector select {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
}

/* Sidebar (Legacy - keeping for compatibility) */
.sidebar {
  width: var(--sidebar-width);
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  overflow-y: auto;
}

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

.sidebar-section h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.time-picker-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.time-picker-group select {
  width: auto;
  min-width: 70px;
}

.time-separator {
  font-weight: 600;
  color: var(--text);
}

.info-box {
  background: var(--bg);
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.info-box label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.info-box span {
  font-weight: 500;
}

.status-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Content Area */
.content-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Panels */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.panel-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

.report-title-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.report-title-container h2 {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-metadata {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: auto;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Report Filters */
.report-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.report-filters.hidden {
  display: none;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.filter-group.hidden {
  display: none;
}

.report-filters select,
.report-filters input[type="date"] {
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
  color: var(--text);
  max-width: 140px;
}

.report-filters input[type="date"] {
  max-width: 130px;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.panel-body {
  padding: 1.5rem;
  min-height: 200px;
}

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--text-muted);
  text-align: center;
  gap: 1.25rem;
  padding: 2rem;
}

.placeholder-icon {
  width: 80px;
  height: 80px;
  stroke: #1a5a5a;
  stroke-width: 1.5;
  fill: none;
  opacity: 0.85;
}

.placeholder-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.placeholder-text {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.5;
  margin: 0;
}

.placeholder .empty-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  opacity: 0.8;
  max-width: 450px;
  line-height: 1.4;
  margin-top: 0.5rem;
}

/* Report Content */
#report-panel {
  flex: 1;
}

#report-content {
  flex: 1;
  overflow: auto;
}

#report-content pre {
  background: var(--bg);
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  overflow-x: auto;
}

#report-content table {
  width: 100%;
  border-collapse: collapse;
}

#report-content th,
#report-content td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

#report-content th {
  background: var(--bg);
  font-weight: 600;
}

/* Chat Panel */
#chat-panel {
  height: 350px;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 200px;
}

/* Chat in tab context */
#tab-ai .chat-messages {
  flex: 1;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

#tab-ai .chat-input-area {
  padding: 0;
  border-top: none;
}

.chat-message {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
}

.chat-message.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-message.assistant {
  background: var(--card);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

#chat-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
}

#chat-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#loading-text {
  margin-top: 1rem;
  color: var(--text-muted);
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1001;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  color: white;
  font-size: 0.875rem;
  animation: slideIn 0.3s ease;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.warning { background: var(--warning); }
.toast.info { background: var(--primary); }

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    position: relative;
    top: 0;
  }
  
  .content-area {
    margin-left: 0;
  }
  
  .main-content {
    flex-direction: column;
  }
}

/* ===================
   HTML Report Styles
   =================== */

.report-html {
  padding: 1.5rem;
}

.report-html h2 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
}

.report-html h3 {
  color: var(--text);
  margin: 1.5rem 0 1rem;
  font-size: 1.25rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.report-html h4 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}

.report-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card.stat-success { border-left: 4px solid var(--success); }
.stat-card.stat-warning { border-left: 4px solid var(--warning); }
.stat-card.stat-info { border-left: 4px solid var(--primary); }
.stat-card.stat-primary { border-left: 4px solid var(--primary-dark); }
.stat-card.stat-danger { border-left: 4px solid var(--error); }

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Report Tables */
.report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.report-table th,
.report-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.report-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text);
}

.report-table tr:hover {
  background: var(--bg);
}

.report-table tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge.status-success { background: #dcfce7; color: #166534; }
.status-badge.status-info { background: #dbeafe; color: #1e40af; }
.status-badge.status-warning { background: #fef3c7; color: #92400e; }
.status-badge.status-danger { background: #fee2e2; color: #991b1b; }
.status-badge.status-default { background: #f1f5f9; color: #475569; }

/* Status Breakdown */
.status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.status-count {
  color: var(--text-muted);
}

.status-amount {
  margin-left: auto;
  font-weight: 600;
}

/* Flow Diagram */
.flow-diagram {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--card);
  border-radius: 8px;
  margin: 1rem 0;
  overflow-x: auto;
}

.flow-stage {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flow-box {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  min-width: 100px;
  background: #dbeafe;
  border: 2px solid #3b82f6;
}

.flow-box.flow-success { background: #dcfce7; border-color: #22c55e; }
.flow-box.flow-info { background: #dbeafe; border-color: #3b82f6; }
.flow-box.flow-warning { background: #fef3c7; border-color: #f59e0b; }
.flow-box.flow-danger { background: #fee2e2; border-color: #ef4444; }
.flow-box.flow-default { background: #f1f5f9; border-color: #94a3b8; }

.flow-count {
  font-size: 1.5rem;
  font-weight: 700;
}

.flow-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.flow-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
}

/* Case List */
.case-list {
  list-style: none;
  margin: 0.5rem 0;
  padding-left: 1rem;
}

.case-list li {
  padding: 0.25rem 0;
}

.status-section {
  margin-bottom: 1.5rem;
}

/* Org Chart */
.org-chart {
  padding: 1.5rem;
  background: var(--card);
  border-radius: 8px;
  margin: 1rem 0;
}

.org-header {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.org-box {
  padding: 1rem 2rem;
  border-radius: 8px;
  text-align: center;
}

.org-firm {
  background: var(--primary);
  color: white;
  font-size: 1.25rem;
}

.org-levels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.org-level {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.org-role-header {
  background: var(--bg);
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.org-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  padding: 1rem;
}

.org-member {
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  max-width: 100%;
}

.member-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}

.member-name:hover {
  overflow: visible;
  white-space: normal;
  word-break: break-word;
  position: relative;
  z-index: 10;
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
}

.member-email {
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}

.member-email:hover {
  overflow: visible;
  white-space: normal;
  word-break: break-all;
  position: relative;
  z-index: 10;
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
}

/* Utility */
.text-muted {
  color: var(--text-muted);
}

/* Custom Report Input */
.custom-report-input {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.custom-report-input textarea {
  width: 100%;
  flex: 1;
  min-height: 180px;
  max-height: 240px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  resize: none;
  background: var(--bg);
  color: var(--text);
}

.custom-report-input textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.custom-report-input textarea::placeholder {
  color: var(--text-muted);
}

/* Prompt Tips */
.prompt-tips {
  margin: 0.5rem 0;
}

.prompt-tips details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0;
}

.prompt-tips summary {
  cursor: pointer;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #0d9488;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prompt-tips summary .tip-icon {
  width: 16px;
  height: 16px;
  stroke: #0d9488;
  flex-shrink: 0;
}

.prompt-tips summary:hover {
  color: #0f766e;
  background: #f1f5f9;
}

.prompt-tips summary:hover .tip-icon {
  stroke: #0f766e;
}

.prompt-tips ul {
  list-style: none;
  padding: 0 12px 12px 12px;
  margin: 0;
  font-size: 0.8rem;
}

.prompt-tips li {
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
}

.prompt-tips li:last-child {
  border-bottom: none;
}

.prompt-tips li strong {
  color: #2563eb;
}

.prompt-tips li em {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  margin-top: 2px;
}

/* Sample Upload Section */
.upload-sample-section {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
}

.divider-text {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.divider-text span {
  padding: 0 0.75rem;
}

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 1.5rem 1rem;
  border: 2px dashed var(--secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--primary);
  background: rgba(13, 148, 136, 0.05);
}

.upload-icon {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.upload-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.upload-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.upload-preview {
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

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

.preview-header span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-status {
  font-size: 0.75rem;
}

.analyzing {
  color: var(--primary);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.analysis-result {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.analysis-success {
  color: #22c55e;
  font-weight: 500;
}

.detected-columns {
  color: var(--text-muted);
  font-size: 0.6875rem;
}

.analysis-text {
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1.4;
}

.analysis-error {
  color: #ef4444;
}

/* Sample Chat Q&A */
.sample-chat {
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.sample-chat-messages {
  min-height: 80px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-light, #fafafa);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.sample-msg {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  line-height: 1.4;
  max-width: 95%;
}

.sample-msg.ai {
  background: var(--bg);
  border: 1px solid var(--border);
  align-self: flex-start;
}

.sample-msg.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
}

.sample-msg.prompt-ready {
  background: #dcfce7;
  border: 1px solid #22c55e;
  color: #166534;
}

.sample-msg.prompt-ready .use-prompt-btn {
  margin-top: 0.5rem;
  background: #22c55e;
  color: white;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
}

.sample-msg.prompt-ready .use-prompt-btn:hover {
  background: #16a34a;
}

.sample-chat-input {
  display: flex;
  gap: 0.5rem;
}

.sample-chat-input input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8125rem;
}

.sample-chat-input input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Query Details */
.query-details {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.query-details summary {
  padding: 0.75rem 1rem;
  background: var(--bg);
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
}

.query-details summary:hover {
  background: var(--border);
}

.sql-query {
  padding: 1rem;
  margin: 0;
  background: #1e293b;
  color: #e2e8f0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Error Box */
.error-box {
  padding: 1.5rem;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
}

.error-box p {
  margin: 0.5rem 0;
}

/* No Results */
.no-results {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: 8px;
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.no-results h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.no-results .suggestions-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem auto;
  max-width: 600px;
  text-align: left;
}

.no-results .suggestions-box h4 {
  color: var(--primary);
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
}

.no-results .suggestions-box ul {
  margin: 0;
  padding-left: 1.25rem;
}

.no-results .suggestions-box li {
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.no-results .suggestions-box li strong {
  color: var(--secondary);
}

.no-results .hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Bar Chart for Insights Dashboard */
.chart-container {
  background: var(--card);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
}

/* Chart skip notice - shows when chart cannot be generated */
.chart-skip-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--warning-bg, #fef3c7);
  border: 1px solid var(--warning-border, #fcd34d);
  border-radius: 6px;
  margin: 1rem 0;
  font-size: 0.875rem;
  color: var(--warning-text, #92400e);
}

.chart-skip-notice svg {
  flex-shrink: 0;
  color: var(--warning-icon, #d97706);
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  gap: 0.5rem;
  padding-top: 1rem;
}

.bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 60px;
}

.bar-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  order: 3;
}

.bar-wrapper {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bar {
  width: 80%;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.bar.bar-primary {
  background: linear-gradient(to top, var(--primary), var(--primary-light, #5eead4));
}

.bar.bar-success {
  background: linear-gradient(to top, #22c55e, #86efac);
}

.bar-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.25rem;
  order: 2;
}

/* Breakdown Section for Billables Report */
.breakdown-section {
  background: var(--card);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

.breakdown-section h3 {
  margin-bottom: 1rem;
  color: var(--text);
}

.breakdown-section h4 {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-label {
  font-weight: 500;
  color: var(--text);
}

.breakdown-values {
  text-align: right;
}

.breakdown-count {
  font-weight: 600;
  color: var(--primary);
}

.breakdown-amount {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

@media (max-width: 640px) {
  .breakdown-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ===================
   Modal Styles
   =================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-content.modal-sm {
  max-width: 360px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-body .form-group {
  margin-bottom: 1rem;
}

.modal-body .form-group:last-child {
  margin-bottom: 0;
}

.modal-body label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.modal-body input,
.modal-body textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.modal-body input:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.modal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.modal-section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

.recurring-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(13, 148, 136, 0.08);
  border-radius: 6px;
  margin-top: 1rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.recurring-hint svg {
  flex-shrink: 0;
  stroke: var(--primary);
  margin-top: 2px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* ===================
   Saved Report Items
   =================== */

.saved-reports-list,
.published-reports-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem;
}

.saved-report-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem;
  transition: all 0.2s;
}

.saved-report-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.saved-report-item.published {
  border-left: 3px solid var(--success);
}

.report-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.report-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-item-badges {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.report-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.report-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.report-category {
  background: var(--bg);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.report-item-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.report-recurring {
  color: var(--text-muted);
  opacity: 0.5;
}

.report-recurring:hover {
  opacity: 1;
  color: var(--primary);
  background: var(--bg);
}

.report-recurring.active {
  opacity: 1;
  color: var(--primary);
}

.report-favorite {
  color: var(--text-muted);
  font-size: 1rem;
  opacity: 0.5;
}

.report-favorite:hover {
  opacity: 1;
  color: var(--warning);
  background: var(--bg);
}

.report-favorite.active {
  opacity: 1;
  color: var(--warning);
}

.btn-delete-outline {
  background: transparent;
  border: 1px solid var(--error);
  color: var(--error);
}

.btn-delete-outline:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-delete-outline svg {
  width: 14px;
  height: 14px;
  stroke: var(--error);
}

.btn-publish {
  width: 85px;
  text-align: center;
}

.published-badge {
  background: var(--success);
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.published-badge.small {
  font-size: 0.5625rem;
  padding: 0.0625rem 0.375rem;
}

.saved-report-item.is-published {
  border-left: 3px solid var(--success);
}

.saved-report-item.is-recurring {
  border-left: 3px solid var(--primary);
}

.saved-report-item.is-published.is-recurring {
  border-left: 3px solid var(--success);
  border-right: 3px solid var(--primary);
}

.report-recurring-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: capitalize;
  background: rgba(13, 148, 136, 0.15);
  color: #0f766e;
  border-radius: 4px;
}

.snapshot-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: #4f46e5;
  border-radius: 4px;
}

/* Recurring group styles */
.recurring-group {
  margin-bottom: 0.5rem;
}

.recurring-parent {
  position: relative;
}

.snapshots-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-hover);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.snapshots-toggle:hover {
  background: var(--surface-active);
  color: var(--text-primary);
  border-color: var(--primary-color);
}

.snapshots-toggle .expand-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

.snapshots-toggle.expanded .expand-icon {
  transform: rotate(90deg);
}

.snapshots-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  margin-left: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: #4f46e5;
  border-radius: 50%;
}

.snapshot-list {
  margin-top: 0.5rem;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border-color);
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  max-height: 1000px;
  opacity: 1;
}

.snapshot-list.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.snapshot-item {
  padding: 0.5rem 0.75rem;
  margin: 0.25rem 0;
  background: var(--surface-hover);
  border-radius: 6px;
  font-size: 0.875rem;
}

.snapshot-item .report-item-header {
  display: flex;
  align-items: center;
}

.snapshot-item .snapshot-indent {
  width: 0.5rem;
}

.snapshot-item .report-item-name {
  font-size: 0.8125rem;
  font-weight: 500;
}

.snapshot-item .report-item-meta {
  margin-top: 0.25rem;
  padding-left: 0.5rem;
}

.snapshot-item .report-item-actions {
  margin-top: 0.375rem;
  padding-left: 0.5rem;
}

.loading-text {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.error-state {
  text-align: center;
  padding: 2rem;
  color: var(--error);
}

/* Checkbox List */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.checkbox-item:hover {
  background: var(--bg);
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.modal-description {
  color: var(--text);
  margin-bottom: 1rem;
}

.modal-details {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-hover);
  border-radius: 4px;
  font-weight: 500;
}

.modal-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #dc2626;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-left: 5px solid #dc2626;
  border-radius: 6px;
  margin-top: 0.5rem;
}

.modal-warning svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: #dc2626;
}

.modal-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 4px;
}

.report-roles {
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.report-roles svg {
  width: 14px;
  height: 14px;
  stroke: #0d9488;
}

/* Report Builder Styles */
.builder-section {
  padding: 1rem;
}

.builder-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.checkbox-list {
  height: 150px;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  background: white;
  resize: vertical;
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.85rem;
}

.checkbox-list label:hover {
  background: var(--bg);
}

.checkbox-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
  margin-left: 0.5rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.loading-small {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.5rem;
  text-align: center;
}

#tab-builder .form-group {
  margin-bottom: 0.75rem;
}

#tab-builder .form-group label {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

#tab-builder .form-group select {
  font-size: 0.85rem;
  padding: 0.4rem 0.5rem;
}

/* Date Range Picker */
.date-range-picker {
  display: flex;
  gap: 0.5rem;
}

.date-range-picker .date-input-group {
  flex: 1;
}

.date-range-picker .date-input-group label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.date-range-picker input[type="month"] {
  width: 100%;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
}

.date-range-picker input[type="month"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 128, 128, 0.1);
}

/* Grouped headers for split-by-status reports */
.report-table.grouped-header .header-group-row th,
.report-table.grouped-header .header-status-row th {
  background: var(--primary) !important;
  color: white !important;
  text-align: center;
  padding: 0.5rem;
}

.report-table.grouped-header .header-group {
  border-left: 2px solid white;
  border-right: 2px solid white;
  font-weight: bold;
  font-size: 0.95rem;
  text-align: center !important;
  vertical-align: middle;
}

.report-table.grouped-header .header-status {
  font-size: 0.8rem;
  font-weight: normal;
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

.report-table.grouped-header .header-group-row th:first-child,
.report-table.grouped-header .header-status-row th:first-child {
  border-left: none;
}

.report-table.grouped-header .header-group-row th:last-child {
  border-right: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AI Review Panel - Shows AI analysis of report results
   ═══════════════════════════════════════════════════════════════════════════ */

.ai-review-panel {
  margin: 1rem 0 1.5rem 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ai-review-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  user-select: none;
}

.ai-review-header:hover {
  background: #ebebeb;
}

.ai-review-header .header-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

.ai-review-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  flex: 1;
}

.ai-review-header .toggle-icon {
  width: 16px;
  height: 16px;
  color: #666;
  transition: transform 0.2s;
}

.ai-review-panel.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.ai-review-panel.collapsed .ai-review-content {
  display: none;
}

.ai-review-content {
  padding: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  background: #fafafa;
}

.ai-review-section {
  background: #fff;
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ai-review-section h4 {
  margin: 0 0 0.4rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-review-section .section-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.ai-review-section ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.8rem;
  color: #555;
}

.ai-review-section li {
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.ai-review-section li:last-child {
  margin-bottom: 0;
}

/* Section-specific accent colors - subtle, professional */
.ai-warnings {
  border-left-color: #d97706;
}

.ai-warnings h4 {
  color: #92400e;
}

.ai-warnings .section-icon {
  color: #d97706;
}

.ai-insights {
  border-left-color: #0891b2;
}

.ai-insights h4 {
  color: #155e75;
}

.ai-insights .section-icon {
  color: #0891b2;
}

.ai-presentation {
  border-left-color: #7c3aed;
}

.ai-presentation h4 {
  color: #5b21b6;
}

.ai-presentation .section-icon {
  color: #7c3aed;
}

.ai-followup {
  border-left-color: #059669;
}

.ai-followup h4 {
  color: #047857;
}

.ai-followup .section-icon {
  color: #059669;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ai-review-content {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Chart Container - Data visualization with Chart.js
   ═══════════════════════════════════════════════════════════════════════════ */

.chart-container {
  margin: 1.5rem 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
}

.chart-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.chart-type-selector {
  display: flex;
  gap: 0.25rem;
}

.chart-type-btn {
  width: 32px;
  height: 32px;
  padding: 6px;
  background: white;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.chart-type-btn svg {
  width: 16px;
  height: 16px;
  color: #666;
}

.chart-type-btn:hover {
  background: #f0f0f0;
  border-color: #bbb;
}

.chart-type-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

.chart-type-btn.active svg {
  color: white;
}

.chart-wrapper {
  padding: 1rem;
  height: 320px;
  position: relative;
}

/* Responsive chart sizing */
@media (max-width: 768px) {
  .chart-wrapper {
    height: 250px;
  }
}

@media (min-width: 1200px) {
  .chart-wrapper {
    height: 380px;
  }
}