/* ══════════════════════════════════════════════════════════════════════
   Projections Dashboard — Styles
   ══════════════════════════════════════════════════════════════════════ */

.proj-main {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.proj-layout {
  display: flex;
  gap: 24px;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ── Left Column ────────────────────────────────────────────────────── */
.proj-left-col {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Chart Section ──────────────────────────────────────────────────── */
.proj-chart-section {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.proj-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.proj-chart-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.proj-legend {
  display: flex;
  gap: 16px;
}

.proj-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.proj-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.line1-color {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.line2-color {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.proj-chart-container {
  flex: 1;
  position: relative;
  min-height: 400px;
  width: 100%;
}

/* ── Sidebar (Right) ────────────────────────────────────────────────── */
.proj-sidebar {
  flex: 1;
  min-width: 300px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.proj-form-card,
.proj-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.proj-form-card h3,
.proj-list-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* Form Styles */
.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.flex-1 {
  flex: 1;
}

.proj-action-toggles {
  display: flex;
  gap: 8px;
}

.proj-radio-label {
  flex: 1;
  cursor: pointer;
}

.proj-radio-label input[type="radio"] {
  display: none;
}

.proj-radio-btn {
  display: block;
  text-align: center;
  padding: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}

.proj-radio-label input[type="radio"]:checked + .add-btn {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--green);
}

.proj-radio-label input[type="radio"]:checked + .sub-btn {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}

.proj-help-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  margin-bottom: 0;
}

/* Data List Styles */
.proj-list-card {
  height: 350px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.proj-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.proj-list-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.proj-list-container::-webkit-scrollbar {
  width: 4px;
}
.proj-list-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.proj-data-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: border-color var(--transition);
}

.proj-data-item:hover {
  border-color: var(--text-muted);
}

.proj-data-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proj-inline-date {
  background: transparent;
  border: 1px dashed transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
  font-family: inherit;
  width: 120px;
}

.proj-inline-date:hover, .proj-inline-date:focus {
  border-color: var(--border);
  background: var(--bg-hover);
}

.proj-inline-date::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
}

.proj-data-amt {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.proj-data-amt.positive { color: var(--green); }
.proj-data-amt.negative { color: var(--red); }

.proj-data-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.proj-badge-line1 {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.proj-badge-line2 {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.proj-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.proj-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.proj-action-btn.del:hover {
  background: var(--red-bg);
  color: var(--red);
}

.proj-action-btn.dup:hover {
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
  z-index: 9999;
  transition: transform 0.3s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
  .proj-layout {
    flex-direction: column;
  }
  
  .proj-chart-section {
    min-height: 450px;
  }

  .proj-sidebar {
    max-width: 100%;
    flex-direction: row;
  }

  .proj-form-card, .proj-list-card {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .proj-main {
    padding: 16px;
  }
  
  .proj-sidebar {
    flex-direction: column;
  }
}
