/* Common Layout Styles */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.top-row {
    display: flex;
    gap: 20px;
}

/* Form Card Styles */
.form-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 375px;
}

.form-card h5 {
    color: #2f2e41;
    margin-bottom: 20px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2f2e41;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: #6C5DD3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(108, 93, 211, 0.1);
}

.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
}

.form-select:focus {
    border-color: #6C5DD3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(108, 93, 211, 0.1);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background-color: #6C5DD3;
    color: #fff;
}

.btn-primary:hover {
    background-color: #5a4dba;
}

.btn i {
    margin-right: 8px;
}

/* Card Styles */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card-body {
    padding: 20px;
}

.card-title {
    color: #2f2e41;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Visualization Card */
.visualization-card {
    flex-grow: 1;
    min-height: 515px;
}

/* Table Styles */
.table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: #2f2e41;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* Spinner */
.spinner {
    display: none;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top: 3px solid #6C5DD3;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-break { word-break: break-all; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }

/* ---------------------------------- Timeline Table Styles (centered alternating) ---------------------------------- */

table.timeline-md {
  position: relative;
  border-collapse: collapse;
  margin: 2rem 0;
  width: 100%;
}

table.timeline-md::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
  transform: translateX(-50%);
  z-index: 0;
}

table.timeline-md tr { border: none; }

table.timeline-md td {
  width: 50%;
  padding: 0 1.5rem 1.5rem 1.5rem;
  position: relative;
  vertical-align: top;
}

/* Date cells */
.left-date { text-align: right; font-weight: 600; color: #495057; }
.right-date { text-align: left; font-weight: 600; color: #495057; }

/* Bullets */
.left-date::after, .right-date::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0d6efd;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #e0e0e0;
  z-index: 1;
}

.left-date::after { right: -6px; }
.right-date::after { left: -6px; }

/* Content cells adjust basic color */
.left-content, .right-content { color: #6c757d; }

@media print {
  /* Ensure colors/backgrounds of pseudo-elements are preserved when printing */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  table.timeline-md::before {
    background: #e0e0e0 !important;
  }
  .left-date::after, .right-date::after {
    background: #0d6efd !important;
    box-shadow: 0 0 0 2px #e0e0e0 !important;
  }
}

/* --- Chat UI Styles --- */
.chat-window {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 12px;
  min-height: 60vh;
  overflow-y: auto;
}
.chat-row {
  display: flex;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.chat-row.user { flex-direction: row-reverse; }
.chat-row.assistant { flex-direction: row; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 0 0.5rem;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  background: #e0e0e0;
}
.avatar.bear {
  background: #6C5DD3;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}
.bubble {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  position: relative;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.user .bubble {
  background: #fff;
  color: #222;
  border: 1px solid #e0e0e0;
}
.assistant .bubble {
  background: #6C5DD3;
  color: #fff;
}
.timestamp {
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.25rem;
  text-align: right;
}
.chat-input-bar {
  display: flex;
  align-items: center;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 0.5rem 1rem;
  margin-top: 1rem;
}
#chatInput {
  border: none;
  flex: 1;
  outline: none;
  background: transparent;
} 